Interfaces for computers in M221A

 

 

 

Machine

Interfaces IP address MAC address
London eth0 132.177.8.23/25 00:C0:4F:8D:9E:25
eth1 132.177.8.97/29 00:50:04:77:cE:17
eth2 132.177.8.105/29 00:50:04:77:cE:21
Dublin eth0 132.177.8.28/25 00:B0:D0:FE:D8:09
eth1 192.168.2.1/24 00:C0:F0:6A:56:51
eth2 192.168.1.1/24 00:C0:F0:6A:6D:0C
Madrid eth0 132.177.8.27/25 00:B0:D0:D8:FD:EA
eth1 192.168.1.2/24 00:C0:F0:6A:74:F1
eth2 192.168.3.1/24 00:C0:F0:6A:74:ED
Prague eth0 132.177.8.29/25 00:B0:D0:D8:FE:91
eth1 192.168.2.2/24 00:C0:F0:6A:6D:4E
eth2 192.168.3.2/24 00:C0:F0:6A:75:10





 

 

 

 


====================
eurosw1     switch      port using information:

M216                                port 1
Dr. Bartos's machine                port 2
M221A
      2 sun workstations            port 7, 8
      London                        port 3,4,5
      Dublin                        port 9
      Madrid                        port 10
      Prague                        port 11

Easy way to check it:

Disconnect and re-connect one cable from NIC side each time. And then
you can see the green led on the specific port of the switch turns yellow,
( autonegotiation state ). Then you find this port is using by that NIC card.

======================
 

 

 

 

Original route tables

london.cs.unh.edu(  generated by "route" command )

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
132.177.8.105   *               255.255.255.255 UH    0      0        0 eth2
132.177.8.97    *               255.255.255.255 UH    0      0        0 eth1
132.177.8.23    *               255.255.255.255 UH    0      0        0 eth0
132.177.8.104   *               255.255.255.248 U     0      0        0 eth2
132.177.8.96    *               255.255.255.248 U     0      0        0 eth1
132.177.8.0     *               255.255.255.128 U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         phub0.cs.unh.ed 0.0.0.0         UG    0      0        0 eth0


dublin.cs.unh.edu ( generated by "route" command )

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
132.177.8.0     *               255.255.255.128 U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         phub0.cs.unh.ed 0.0.0.0         UG    0      0        0 eth0


madrid.cs.unh.edu ( generated by "route" command )

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
132.177.8.0     *               255.255.255.128 U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         phub0.cs.unh.ed 0.0.0.0         UG    0      0        0 eth0


prague.cs.unh.edu ( generated by "route" command )

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
132.177.8.0     *               255.255.255.128 U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         phub0.cs.unh.ed 0.0.0.0         UG    0      0        0 eth0


 


Now experiment the unrouted ip address on Madrid:eth2 and Prague:eth2

Preparation work on madrid and prague

Step 1. Bring up eth2 on madrid and set ip address to 192.168.3.1/24
     
      # ifconfig eth2 192.168.3.1 netmask 255.255.255.0 up

Step 2. Bring up eth2 on prague and set ip address to 192.168.3.2/24
     
      # ifconfig eth2 192.168.3.2 netmask 255.255.255.0 up

Experiment
Step 1. On Madrid, the current routing table is:

ernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.1     *               255.255.255.255 UH    0      0        0 eth2
madrid.cs.unh.e *               255.255.255.255 UH    0      0        0 eth0
132.177.8.106   *               255.255.255.255 UH    0      0        0 eth1
132.177.8.104   *               255.255.255.248 U     0      0        0 eth1
132.177.8.0     *               255.255.255.128 U     0      0        0 eth0
192.168.3.0     *               255.255.255.0   U     0      0        0 eth2
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         phub0.cs.unh.ed 0.0.0.0         UG    0      0        0 eth0

Step 2. Delete the routing entry to network 132.177.8.104/29. The goal is to see
the route to this network will use default gateway.


#route del -net 132.177.8.104 netmask 255.255.255.248
#route

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.1     *               255.255.255.255 UH    0      0        0 eth2
madrid.cs.unh.e *               255.255.255.255 UH    0      0        0 eth0
132.177.8.106   *               255.255.255.255 UH    0      0        0 eth1
132.177.8.0     *               255.255.255.128 U     0      0        0 eth0
192.168.3.0     *               255.255.255.0   U     0      0        0 eth2
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         phub0.cs.unh.ed 0.0.0.0         UG    0      0        0 eth0

#ping -c 3 132.177.8.105

Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP
PING 132.177.8.105 (132.177.8.105) from 132.177.8.27 : 56(84) bytes of data.
64 bytes from 132.177.8.105: icmp_seq=0 ttl=255 time=604 usec
64 bytes from 132.177.8.105: icmp_seq=1 ttl=255 time=319 usec
64 bytes from 132.177.8.105: icmp_seq=2 ttl=255 time=316 usec

--- 132.177.8.105 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/mdev = 0.316/0.413/0.604/0.135 ms


From the above, we know that the route to network 132.177.8.104 is via default route


Step 4. Delete the route to network 192.168.3.1/24

#route del -net 192.168.3.0 netmask 255.255.255.0
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.1     *               255.255.255.255 UH    0      0        0 eth2
madrid.cs.unh.e *               255.255.255.255 UH    0      0        0 eth0
132.177.8.106   *               255.255.255.255 UH    0      0        0 eth1
132.177.8.0     *               255.255.255.128 U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         phub0.cs.unh.ed 0.0.0.0         UG    0      0        0 eth0


#ping -c 3 192.168.3.2
Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP
PING 192.168.3.2 (192.168.3.2) from 132.177.8.27 : 56(84) bytes of data.
From 208.51.142.109: Destination Host Unreachable

--- 192.168.3.2 ping statistics ---
3 packets transmitted, 0 packets received, +1 errors, 100% packet loss


From the above message, we can see that IP 192.168.*.* is NOT routed via default route

Step 5. Add the routing rule to 192.168.3.0/24 and ping 192.168.3.2

#route add -net 192.168.3.0 netmask 255.255.255.0 dev eth2
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.1     *               255.255.255.255 UH    0      0        0 eth2
madrid.cs.unh.e *               255.255.255.255 UH    0      0        0 eth0
132.177.8.106   *               255.255.255.255 UH    0      0        0 eth1
132.177.8.0     *               255.255.255.128 U     0      0        0 eth0
192.168.3.0     *               255.255.255.0   U     0      0        0 eth2
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         phub0.cs.unh.ed 0.0.0.0         UG    0      0        0 eth0

# ping -c 3 192.168.3.2
Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP
PING 192.168.3.2 (192.168.3.2) from 192.168.3.1 : 56(84) bytes of data.
64 bytes from 192.168.3.2: icmp_seq=0 ttl=255 time=925 usec
64 bytes from 192.168.3.2: icmp_seq=1 ttl=255 time=80 usec
64 bytes from 192.168.3.2: icmp_seq=2 ttl=255 time=75 usec

--- 192.168.3.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/mdev = 0.075/0.360/0.925/0.399 ms


All the above experiments are done on linux kernel 2.2.16 ( redhat 7.0 )

Now we need to do experiment on latest kernel 2.4.10. Since the new kernel may not have the 2 new NIC cards' driver, we need to compile kernel to get the driver and insmod to the kernel on bootup


Step 1. change directory to the kernel 2.4.10 directory.
"make menuconfig" ==>select the "network device option"
==> select "Ethernet (10 or 100Mbit)"
==>select "DECchip Tulip(dc21x4x) PCI support"

If you choose to compile it as module, you also need to "make bzImage".
Otherwise your old kernel won't automatically load NIC module when needed.
You will need to manually "insmod tulip.o" after system is up.

#make bzImage
#make modules
#su
#make modules_install
 

 

 

 

===========================

Experiment: Use Dublin as router to route between network 192.168.1.0/24 and 192.168.2.0/24


since the ip packets of address 192.168.*.* won't be routed via default route, let's set dublin as router between madrid and prague.( See the diagram on the very beginning) ping to madrid eth1( 192.168.1.2 ) from prague.


The following command are applied on PRAGUE.cs.unh.edu

#route

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
132.177.8.0 * 255.255.255.128 U 0 0 0 eth0
192.168.3.0 * 255.255.255.0 U 0 0 0 eth2
192.168.2.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default phub0.cs.unh.ed 0.0.0.0 UG 0 0 0 eth0

# ping -c 3 192.168.1.2
Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP
PING 192.168.1.2 (192.168.1.2) from 132.177.8.29 : 56(84) bytes of data.

--- 192.168.1.2 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

# route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.1 dev eth1 # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
132.177.8.0 * 255.255.255.128 U 0 0 0 eth0
192.168.3.0 * 255.255.255.0 U 0 0 0 eth2
192.168.2.0 * 255.255.255.0 U 0 0 0 eth1
192.168.1.0 192.168.2.1 255.255.255.0 UG 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default phub0.cs.unh.ed 0.0.0.0 UG 0 0 0 eth0

# ping -c 3 192.168.1.2
Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP
PING 192.168.1.2 (192.168.1.2) from 192.168.2.2 : 56(84) bytes of data.

--- 192.168.1.2 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss




what's worng?????

# ping -c 3 192.168.1.1
Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP
PING 192.168.1.1 (192.168.1.1) from 192.168.2.2 : 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=0 ttl=255 time=214 usec
64 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=65 usec
64 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=59 usec\


--- 192.168.1.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/mdev = 0.059/0.112/0.214/0.072 ms



Here we can know that packet to 192.168.1.0/24 does arrive at dublin. But why it's not forwarded to Madrid(192.168.1.2)


# route del -net 192.168.1.0 netmask 255.255.255.0
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
132.177.8.0 * 255.255.255.128 U 0 0 0 eth0
192.168.3.0 * 255.255.255.0 U 0 0 0 eth2
192.168.2.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default phub0.cs.unh.ed 0.0.0.0 UG 0 0 0 eth0
 

# ping -c 3 192.168.1.1
Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP
PING 192.168.1.1 (192.168.1.1) from 132.177.8.29 : 56(84) bytes of data.

--- 192.168.1.1 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss



Here we can know that packet to 192.168.1.0/24 does use the routing entry added before :
192.168.1.0 192.168.2.1 255.255.255.0 UG 0 0 0 eth1


The problem might be:
eth1 of madrid does receive the ping packet, but it doesn't know how to get 192.168.2.0/24.
To test this assumption. Do the following on Madrid.cs.unh.edu


# route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth1
# route

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
132.177.8.0 * 255.255.255.128 U 0 0 0 eth0
192.168.3.0 * 255.255.255.0 U 0 0 0 eth2
192.168.2.0 192.168.1.1 255.255.255.0 UG 0 0 0 eth1
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default phub0.cs.unh.ed 0.0.0.0 UG 0 0 0 eth0

# ping 192.168.2.1
Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP
PING 192.168.2.1 (192.168.2.1) from 192.168.1.2 : 56(84) bytes of data.
64 bytes from 192.168.2.1: icmp_seq=0 ttl=255 time=213 usec
64 bytes from 192.168.2.1: icmp_seq=1 ttl=255 time=63 usec
64 bytes from 192.168.2.1: icmp_seq=2 ttl=255 time=78 usec
64 bytes from 192.168.2.1: icmp_seq=3 ttl=255 time=62 usec

--- 192.168.2.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/mdev = 0.062/0.104/0.213/0.063 ms


# ping 192.168.2.2
Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP
PING 192.168.2.2 (192.168.2.2) from 192.168.1.2 : 56(84) bytes of data.

--- 192.168.2.2 ping statistics ---
85 packets transmitted, 0 packets received, 100% packet loss


So my assumption was wrong. What's the matter????

The problem might be:
Dublin accepts packets but it doesn't relay the packets it receives. It forwards packets that only originating from itself.

To test this assumption, we need to set something on Dublin---our assumed router
. But WHERE and HOW????


After checking the service that Dublin offers, I found that Dublin does not install routed or gated. This might be the problem.

It's proved that this is not a problem. routed implement RIP, gated implements RIP and OSPF and other dynamic routing protocols. Here we just want to test static routing.

 

Finally, I found why. The ip forwarding function on Dublin is not on . So Dublin.cs.unh.edu can NOT forward the packets received by it and destinated other machine.

To fix the problem, Login as root and do the following on Dublin.cs.unh.edu:
#echo 1 > /proc/sys/net/ipv4/ip_forward

Note you need to

  • compile /proc file system into the kernel
  • select "Sysctl support" option in "General setup" option when "make xconfig" .

  • These options allow to dynamically change certain kernel parameters and variables on the fly without requiring a recompile of the kernel or reboot of the system. That is what "echo..." does.