Exercise 1 Given the IP network below: Assign feasible IP addresses to the interfaces and write down a feasible routing table for routers A and B guaranteeing full connectivity x.x.x.33 x.x.x.254 net 131.175.16.0/24 B x.x.x.254 Net 131.175.15.0/24 x.x.x.254 A Net 131.175.70.0/24 x.x.x.52 x.x.x.254 INTERNET net 131.175.21.0/24 Net 131.175.75.0/24 x.x.x.254
Solution 1 A Routing Table network netmask first hop 131.175.15.0 255.255.255.0 131.175.16.33 131.175.70.0 255.255.255.0 131.175.16.33 0.0.0.0 0.0.0.0 131.175.21.254 B Routing Table network netmask first hop 131.175.21.0 255.255.255.0 131.175.16.254 131.175.75.0 255.255.255.0 131.175.16.254 0.0.0.0 0.0.0.0 131.175.16.254 A Interfaces interface address netmask A 131.175.21.52 255.255.255.0 B 131.175.16.254 255.255.255.0 C 131.175.75.254 255.255.255.0 B Interfaces interface address netmask A 131.175.16.33 255.255.255.0 B 131.175.70.254 255.255.255.0 C 131.175.15.254 255.255.255.0 network netmask first hop 0.0.0.0 0.0.0.0 131.175.16.254
Routing & Forwarding
Activity 1 Given the network below: Router eth0 A D eth1 B Let IP-x and MAC-x be the IP and Ethernet Addresses of x=[a,b,c,d] respectively. C
Activity 1 Router eth0 A D eth1 B We assume empty ARP tables for A, D and the Router Host A needs to send out an IP packet destined to host D. Upon reception, host D answers with a packet destined to A. a) Plot the sequence of all messages/packets exchanged among the three entities with the correspondent addresses used (at both the IP and Ethernet level) C
Solution 1 Router A D ARP request src: MAC-A dest: broadcast layer ARP: IP-A, MAC-A, IP-B,? B C ARP reply src: MAC-B dest: MAC-A layer ARP: IP-A, MAC-A, IP-B, MAC-B
Solution 1 Router A D PACKET A-D src: MAC-A dest: MAC-B layer 3: src: IP-A dest: IP-D B C
Solution 1 Router A D B C ARP request src: MAC-C dest: broadcast layer ARP: IP-C, MAC-C, IP-D,? ARP reply src: MAC-D dest: MAC-C layer ARP: IP-C, MAC-C, IP-D, MAC-D
Solution 1 Router A D B C PACKET A-D src: MAC-C dest: MAC-D layer 3: src: IP-A dest: IP-D PACKET D-A src: MAC-B dest: MAC-A layer 3: src: IP-D dest: IP-A PACKET D-A src: MAC-D dest: MAC-C layer 3: src: IP-D dest: IP-A
Activity 2 Bridge eth0 A D eth1 B b) Solve the same exercise, assuming now the interconnecting device is a Bridge C
Solution 2 Bridge A D B C ARP request src: MAC-A dest: broadcast layer ARP: IP-A, MAC-A, IP-D,? ARP reply src: MAC-D dest: MAC-A layer ARP: IP-A, MAC-A, IP-D, MAC-D
Solution 2 Bridge A D PACKET A-D src: MAC-A dest: MAC-D layer 3: src: IP-A dest: IP-D B C PACKET D-A src: MAC-D dest: MAC-A layer 3: src: IP-D dest: IP-A
Activity 3 A router has the following routing table and the following interfaces network netm ask first hop 131.175.21.0 255.255.255.0 131.17.123.254 131.175.16.0 255.255.255.0 131.17.78.254 131.56.0.0 255.255.0.0 131.17.15.254 131.155.0.0 255.255.0.0 131.17.15.254 0.0.0.0 0.0.0.0 131.17.123.254 interface eth0 IP address 131.17.123.1 netm ask 255.255.255.0 interface eth1 IP address 131.17.78.1 netm ask 255.255.255.0 interface eth2 IP address 131.17.15.12 netm ask 255.255.255.0 How does the router forward the IP packets with the following IP destination addresses? 131.17.123.88 131.56.78.4 190.78.90.2
Solution 3 network netm ask first hop 131.175.21.0 255.255.255.0 131.17.123.254 131.175.16.0 255.255.255.0 131.17.78.254 131.56.0.0 255.255.0.0 131.17.15.254 131.155.0.0 255.255.0.0 131.17.15.254 0.0.0.0 0.0.0.0 131.17.123.254 interface eth0 IP address 131.17.123.1 netm ask 255.255.255.0 interface eth1 IP address 131.17.78.1 netm ask 255.255.255.0 interface eth2 IP address 131.17.15.12 netm ask 255.255.255.0 131.17.123.88 Directly Forwarded through interface eth0 131.56.78.4 Forwarded to the next hop 131.17.15.254 190.78.90.2 Forwarded to the default gateway 131.175.123.254
Ex. 4 A router has the following routing table and interfaces configuration. eth0 192.170.123.4 255.255.255.0 eth1 192.170.124.4 255.255.255.0 Network Netmask Next Hop 191.138.112.0 255.255.240.0 192.170.123.1 191.138.96.0 255.255.224.0 192.170.124.1 191.138.0.0 255.255.0.0 192.170.123.2 191.138.160.0 255.255.224.0 192.170.124.2 0.0.0.0 0.0.0.0 192.170.123.3 The router receives packets with the following IP destination addresses: 1. 191.138.163.13 2. 191.138.113.32 3. 131.175.123.244 4. 255.255.255.255 5. 192.170.123.255 received from interface eth1 6. 0.0.0.3 received from interface eth0 Specify the behavior of the router for each packet. What kind of forwarding is implemented (direct, indirect)? Which is thenext hop Which the line of the routing table used to decide the next hop?
20/09/2006 -Ex. 4 191.138.163.13 AND 1. /20 = 191.138.160.0 2. /19 = 191.138.160.0 3. /16 = 191.138.0.0 4. /19 = 191.138.160.0 5. /0 = 0.0.0.0 OK OK OK Network Netmask Next Hop 1 191.138.112.0 255.255.240.0 192.170.123.1 2 191.138.96.0 255.255.224.0 192.170.124.1 3 191.138.0.0 255.255.0.0 192.170.123.2 4 191.138.160.0 255.255.224.0 192.170.124.2 5 0.0.0.0 0.0.0.0 192.170.123.3 Indirect Forwarding 192.170.124.2
20/09/2006 -Ex. 4 191.138.113.32 AND 1. /20 = 191.138.112.0 2. /19 = 191.138.96.0 3. /16 = 191.138.0.0 4. /19 = 191.138.112.0 5. /0 = 0.0.0.0 OK OK OK OK Network Netmask Next Hop 1 191.138.112.0 255.255.240.0 192.170.123.1 2 191.138.96.0 255.255.224.0 192.170.124.1 3 191.138.0.0 255.255.0.0 192.170.123.2 4 191.138.160.0 255.255.224.0 192.170.124.2 5 0.0.0.0 0.0.0.0 192.170.123.3 Indirect Forwarding 192.170.123.1
20/09/2006 -Ex. 4 131.175.123.244 AND 1. /20 No match 2. /19 No match 3. /16 No match 4. /19 No match 5. /0 = 0.0.0.0 OK Network Netmask Next Hop 1 191.138.112.0 255.255.240.0 192.170.123.1 2 191.138.96.0 255.255.224.0 192.170.124.1 3 191.138.0.0 255.255.0.0 192.170.123.2 4 191.138.160.0 255.255.224.0 192.170.124.2 5 0.0.0.0 0.0.0.0 192.170.123.3 Indirect Forwarding 192.170.123.3
20/09/2006 -Ex. 4 eth0 192.170.123.4 255.255.255.0 eth1 192.170.124.4 255.255.255.0 Network Netmask Next Hop 1 191.138.112.0 255.255.240.0 192.170.123.1 2 191.138.96.0 255.255.224.0 192.170.124.1 3 191.138.0.0 255.255.0.0 192.170.123.2 4 191.138.160.0 255.255.224.0 192.170.124.2 5 0.0.0.0 0.0.0.0 192.170.123.3 255.255.255.255 Limited broadcast, router drops the packet 192.170.123.255 from eth1 Direct broadcast to subnet 192.170.123.0, router forwards the packet through eth0 0.0.0.3 from eth0 It is never a valid destination address, the router drops the packet
Activity 4 A router has the following routing table and the following interfaces. The router receives 8 packets whose destination IP addresses and incoming interfaces are reported below. Indicate what is the behavior of the router for each packet indicating: If the packet is forwarded or not In the case the packet is forwarded, the next hop (IP address) whether the forwarding is direct or indirect eth0 Interface IP Address Netmask Eth0 131.175.123.235 255.255.255.0 R eth2 Eth1 Eth2 131.175.123.129 131.175.122.1 255.255.255.128 255.255.255.0 eth1 Network 130.170.0.0 130.171.0.0 130.171.4.0 130.170.10.0 0.0.0.0 Netmask 255.255.0.0 255.255.0.0 255.255.252.0 255.255.254.0 0.0.0.0 Next Hop 131.175.123.1 131.175.123.132 131.175.122.2 131.175.122.3 131.175.123.3 RECEIVED PACKETS A. 131.175.123.64 from eth2 B. 131.175.123.255 from eth0 C. 131.175.123.132 from eth2 D. 130.170.132.240 from eth1 E. 130.170.11.64 from eth1 F. 130.171.5.125 from eth1 G. 156.198.34.14 from eth0 H. 0.0.0.132 from eth1
Solution 4 eth0 Interface IP Address Netmask Eth0 131.175.123.235 255.255.255.0 R eth2 Eth1 Eth2 131.175.123.129 131.175.122.1 255.255.255.128 255.255.255.0 eth1 Network 130.170.0.0 130.171.0.0 130.171.4.0 130.170.10.0 0.0.0.0 Netmask 255.255.0.0 255.255.0.0 255.255.252.0 255.255.254.0 0.0.0.0 Next Hop 131.175.123.1 131.175.123.132 131.175.122.2 131.175.122.3 131.175.123.3 A. 131.175.123.64 from eth2 direct forwarding through eth0 B. 131.175.123.255 direct broadcast address: not forwarded C. 131.175.123.132 direct forwarding through eth1
R Solution 4 eth0 eth1 Interface Eth1 131.175.123.129 255.255.255.128 eth2 Eth2 131.175.122.1 255.255.255.0 D. 130.170.132.240 from eth1 Indirect forwarding, 1st line routing table, NH: 131.175.123.1 E. 130.170.11.64 from eth1 Indirect forwarding, 4th line routing table, NH: 131.175.122.3 F. 130.171.5.125 from eth1 Indirect forwarding, 3rd line routing table, NH: 131.175.122.2 Eth0 Network 130.170.0.0 130.171.0.0 130.171.4.0 130.170.10.0 0.0.0.0 IP Address 131.175.123.235 Netmask 255.255.0.0 255.255.0.0 255.255.252.0 255.255.254.0 0.0.0.0 Netmask 255.255.255.0 Next Hop 131.175.123.1 131.175.123.132 131.175.122.2 131.175.122.3 131.175.123.3
Solution 4 R eth0 eth1 Interface Eth1 131.175.123.129 255.255.255.128 eth2 Eth2 131.175.122.0 255.255.255.0 Eth0 Network 130.170.0.0 130.171.0.0 130.171.4.0 130.170.10.0 0.0.0.0 IP Address 131.175.123.235 Netmask 255.255.0.0 255.255.0.0 255.255.252.0 255.255.254.0 0.0.0.0 Netmask 255.255.255.0 Next Hop 131.175.123.1 131.175.123.132 131.175.122.2 131.175.122.3 131.175.123.3 G. 156.198.34.14 from eth0 Indirect forwarding, last line routing table, NH: 131.175.123.3 H. 0.0.0.132 from eth1 special address, only source, not processed