Sunteți pe pagina 1din 4

Introduction to Routing & Switching Networks #1

FIT - HUI
Dec, 2012
Network background
1 ARP
Because there are both network-layer addresses (IP-addresses) and link-layer addresses
(i.e. LAN addresses), there is a need to translate between them. For the Internet, this is
the job of the address resolution protocol (ARP). The command arp allows you to view
the ARP table which contains the mapping of IP addresses to LAN addresses on the local
network.
Run arp on your machine. Is there an entry in the ARP table for every host on the same
LAN? Find out how entries enter and leave the ARP table and give a brief description.
How can you use this information to determine the Ethernet address of a host on the
same LAN that is currently not present in the ARP table of your machine?
2 IP addresses assignment
Imagine you have three new startup companies coming to you in need of IP addresses.
T has 256 machines, To has 1000 and Tn is the largest with 5000 machines in their
premises.
1. If traditional classful IP addressing with classes A, B and C is used, what could
be a valid address assignment to fulfill these organizations needs and how many
addresses would be wasted?
2. Due to your careless assignment strategy you are suddenly confronted with a short-
age of addresses and you decide to finally adopt Classless Inter-Domain Routing
(CIDR). What CIDR blocks could you assign to the organizations in order to min-
imize the number of unused addresses? Because we are focusing on the size of the
network, you can omit the prefix and answer something like /<number>. How many
unused addresses are there now with you new assignment?

Those problems are derived from Computer Networks: A Top-Down Approach, and CMU Computer
Networks course
1
3 Forwarding Table
1. A forwarding table for a router in a network using CIDR is given below.
Address prefix Next hop
200.0.0.0/5 A
192.0.0.0/2 B
128.0.0.0/2 C
0.0.0.0/0 D
(a) If the router receives a packet with destination 199.42.13.37, what will the next
hop be?
(b) If the router recieves a packet with destination 255.255.255.255, what will the
next hop be?
(c) Suppose I add the entry 128.25.0.0/16 to the routing table. Will lookups still
yield a single forwarding entry? Please explain.
(d) What actually happens to a packet that only matches 0.0.0.0/0?
2. A network C advertises the network number 192.3.124/22 (and no other numbers).
Numbers (all 24 bits) could AS C own? (circle ALL that apply)
(a) 192.3.123
(b) 192.3.124
(c) 192.3.125
(d) 192.3.128
(e) 192.3.10
(f) 192.4.124
4 Routing and bridging
In the partial network topology shown above, a well-formed IP packet with a destination
IP of 128.2.19.5 and TTL of 8 arrives at router1 via the external link. Link1 uses the
subnet 128.2.17.34/31 and Link2 has the subnet 128.2.19.0/25.
The hosts and routers on the ethernet subnet are all connected to their own port on
an ethernet switch (a learning bridge).
1. What is the subnet mask of eth0 on host1?
2. What are the forwarding entries used by each router to forward the packet to
128.2.19.5?
Router Destination Mask Next-Hop Interface
router 1
router 2 128.2.19.0 255.255.255.128 (/25) directly connected eth1
3. If this packet (from the outside to 128.2.19.5) is the first packet to be forwarded on
the network, ARP requests will be sent out on both Link1 and Link2. Fill in the
following ARP header fields for the requests.
2
Link MAC source address MAC destination address IP address queried for
link 1
link 2
4. Circle all of the header fields in the following list that router2 will change between
when it receives the packet on eth0 and when it transmits the packet on eth1.
Ethernet Header:
(a) Source address
(b) Destination address
(c) EtherType
(d) None
IP Header:
(a) Source address
(b) Destination address
(c) Protocol
(d) IP TTL
(e) IP Header Length
(f) IP Header Checksum
(g) IP ID
(h) None
5. Circle all of the header fields in the following list that will change from when the
switch receives the packet on the port connected to router2 and when it transmits
the packet on an outgoing port.
Ethernet Header:
3
(a) Source address
(b) Destination address
(c) EtherType
(d) None
IP Header:
(a) Source address
(b) Destination address
(c) Protocol
(d) IP TTL
(e) IP Header Length
(f) IP Header Checksum
(g) IP ID
(h) None
6. Assume that no packets have been transmitted on the network until the first packet
to host2 arrives. In this question, assume that a host sees a packet if it is transmit-
ted on its local medium by any device other than itself, but does not see packets
that it generates. Select the correct answer below to indicate how many packets
host2 sees and how many packets all other hosts on the network see. Include both
ARP packets and data packets.
(a) host2 = 1. All others = 0
(b) host2 = 1. All others = 1
(c) host2 = 2. All others = 0
(d) host2 = 2. All others = 1
(e) host2 = 2. All others = 2
4

S-ar putea să vă placă și