3.4 IP Services 3.4.2 DHCP and BOOTP
Ethernet Networking Technology Guide  /  3 Network Simulation  /  3.4 IP Services  / 

3.4.1 IP Based Routing

Simics' service node can provide IP based routing between Ethernet links, allowing machines attached to different networks to communicate with each other.

Note: To use the routing mechanisms, simulated machines must use the IP address of the service node as a gateway for IP based traffic. Configuring a gateway requires system administration skills, and the exact procedure depends on the target operating system.
Each connection of the service-node to an Ethernet link implies a default route to that link. For example, connecting a service node with the address 192.168.0.1/24 to link1 implies that all packets matching this network and mask combination will be routed to link1 automatically. This often solves the most common routing needs.

In addition, the service node contains an internal IP routing table that is used for packet routing between connected links. The routing table can be viewed using the <service_node_comp>.route command:

simics> sn0.route
Destination  Netmask  Gateway  Link 
------------------------------------
10.10.0.0    24                link0

The output is quite similar to route command available on many systems. The destination and netmask fields specify a target that can be either a network (i.e., a range of addresses) or a single host (with netmask 255.255.255.255). For packets with this target as their destination, the link field specifies the Ethernet link the packet should be sent to.

New entries can be added to the routing table with the <service_node_comp>.route-add command. If there is a service node called sn0 connected to two links called link0 and link1, it would for example possible to set up routes like this:

simics> sn0.route-add 192.168.0.0 255.255.0.0 link = link0
simics> sn0.route-add 192.168.1.0/26 link = link1
simics> sn0.route-add 10.10.0.0 255.255.0.0 192.168.0.1 link0
simics> sn0.route-add 0.0.0.0 255.255.255.255 192.168.1.1 link1
simics> sn0.route
Destination  Netmask  Gateway      Link 
----------------------------------------
192.168.0.0  16                    link0
192.168.1.0  26                    link1
10.10.0.0    16       192.168.0.1  link0
default               192.168.1.1  link1

The destination address and the netmask identify the target, and should be given as strings in dotted decimal form. If the target is a single host, the netmask should be given as "255.255.255.255".

3.4 IP Services 3.4.2 DHCP and BOOTP