5. Network Layer and Internetworking - University of...
Transcript of 5. Network Layer and Internetworking - University of...
![Page 1: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/1.jpg)
1Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
5. Network Layer and Internetworking
![Page 2: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/2.jpg)
2Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Outline
� Network layer design and Network services� Routing
• Shortest path routing (Dijkstra algorithm)• Distance vector routing • Link state routing
� Internetworking� The Internet
• IP protocol, address, subnet, CIDR, ICMP• Open Shortest Path First (OSF) protocol
� Advanced topics • IP multicast, Mobile IP, Security and IPv6
![Page 3: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/3.jpg)
3Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Network layer design
� The goal is to provide end to end transmission:• Get packets from the source to the destination hosts
� To achieve the goals, each router try to:• Find out the subnet topology• Find routes to avoid overloading some of the links and routers• Deal with problems due to differences networks.
� Design issues:• Provide services independent of the subnet technology
(networks and routers)• Shield the Transport Layer from the subnet• Provide the Transport Layer with network addresses using
uniformed numbering plan
![Page 4: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/4.jpg)
4Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Implementation of Connectionless Service
Routing within a datagram subnet.
![Page 5: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/5.jpg)
5Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Implementation of Connection-Oriented Service
Routing within a virtual-circuit subnet.
![Page 6: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/6.jpg)
6Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Virtual-Circuit vs Datagram Subnets
5-4
![Page 7: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/7.jpg)
7Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Connectionless vs Connection Oriented Services
� Connectionless with full address in each packet - complexity in Transport Layer• Each router forwards the packet based on the routing table
� Connection oriented - complexity in network layer• Setting up connection based on the routing table• Terminate connection with a special identifier • Negotiate traffic parameters, quality of service, cost• Each packet with the identifier and forwarded along the
connection• Both directions in sequence• Flow control • Other optional properties: guaranteed, confirmation and priority
![Page 8: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/8.jpg)
8Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Routing Algorithm
� Routeing algorithm is part of the network layer software� For datagrams, decision is made for each packet� For virtual circuit, decision is made when setting up� Desirable properties: correctness, simplicity, robustness,
stability, fairness, and optimality.� Two major classes of routeing algorithms: non-adaptive
(static routeing) and adaptive (dynamic routeing)� The optimality principle; if router J is on the optimal path
from router I to router K, then the optimal path from J to K also falls along the same route.
![Page 9: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/9.jpg)
9Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Shortest path routeing (Dijkstra 1959)
� The nodes represent routers and arcs representing links
� Metrics include: hops or distances, mean queuing length and transmission delay
� Labels on the arcs can also be: function of the distance, bandwidth, average traffic, communication cost, mean queuing length, measured delay, and other factors
![Page 10: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/10.jpg)
10Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Labelling method
1. Start from A (working node) marked as permanent node, and other node with infinite distance
2. Calculate nodes adjacent to A, re-labelling each one with the distance to A
3. The node (B) with smallest distance to A is made permanent, and become the new working node.
4. Then repeat 1-3 until all the nodes are reached and examined
![Page 11: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/11.jpg)
11Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Distance vector routeing (used by RIP)
� Each router maintains a routeing table containing one entry for each router in the subnet
� Each entry contains two parts: the preferred out going line to use for that destination, and an estimated of time or distance to that destination.
� Assume that delay is used as a metric and that the router knows the delay to each of its neighbours
� Once every T seconds each router sends the table to its neighbours
� It also receives tables from its neighbours and updates its own table
From
![Page 12: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/12.jpg)
12Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
The Count-to-Infinity problem
A B C D E
∞ ∞ ∞ ∞ Initially to A
1 ∞ ∞ ∞ After 1 exchange
1 2 ∞ ∞ After 2 exchange
1 2 3 ∞ After 3 exchange
1 2 3 4 After 4 exchange
A B C D E
1 2 3 4 Initially to A
3 2 3 4 After 1 exchange
3 4 3 4 After 2 exchange
5 4 5 4 After 3 exchange
5 6 5 6 After 4 exchange
7 6 7 6 After 5 exchange
∞ ∞ ∞ ∞
•Good news travels fast •Bad news travels slowly
![Page 13: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/13.jpg)
13Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
The Split Horizon Hack
� The split horizon algorithm works the same way as distance vector routing
� Except that the distance to X is not reported on the line that packets from X are sent on (it reported as infinity)
• Split Horizon can also fails
A B
C
D
![Page 14: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/14.jpg)
14Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Problems with distance vector algorithm
� Distance vector was used until 1979� The delay metric was queue length, it did not take
bandwidth into account� It takes too long to converge� The bandwidth changed from 56 Kbit/s to 230 or 1544
Kbit/s� The distance vector algorithm was replaced by an entirely
new algorithm (Link State routing)
![Page 15: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/15.jpg)
15Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Link state routeing (used by OSPF)
To solve the problems with the distance vector, there are five steps in the link state algorithm:
1. Learning about the neighbours (network address): use a HELLO special packet
2. Measuring line cost or delay to its neighbours: use a special ECHO packet
3. Building link state packets 4. Distributing the link state packets: use flooding, sequence
numbers and ages5. Computing the new routes (shortest path) to every
neighbour router
![Page 16: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/16.jpg)
16Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Learning about the neighbours
� Each router is identified uniquely
� When a router is booted, it sending a special HELLO packet on each point-to-point link to learn who its neighbours are
� LAN is modelled as a node
![Page 17: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/17.jpg)
17Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Measuring line cost
� Measure the round trip time (RTT) by sending special ECHO packet over the line that the other side is required to send back immediately
� The delay can be estimated by the RTT divided by 2� To take load into account, the timer must be started
when the ECHO packet is queued� To ignore the load, the timer should be started when
the ECHO packet reaches the front of the queue� Should the load be taken into account ?
![Page 18: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/18.jpg)
18Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Building link state packets
![Page 19: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/19.jpg)
19Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Distributing the link state packets
� Using Flooding method� Each packet contains a
sequence number� Include the packet age � Each router keeps track of all
the (source router, sequence) pairs it sees
� Forward new packets and discard packets seen already
� Make it more robust by holding the packet for a short while before flooding
Packet comes from
Packet floods to
Packetacks to
![Page 20: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/20.jpg)
20Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Computing the new routes
� Once a router has accumulated a full set of link state packets, it can construct the entire subnet graph
� Dijkstra’s algorithm can be run locally to construct the shortest path to all possible destinations
� The memory requirement is proportional to the number of the routers (n) and number of neighbours (k) each has: kn
� Some possible problems: hardware or software problem, routing calculated wrongly, and the probability of some routers failing occasionally becomes non-negligible
� OSPF uses a link state algorithm
![Page 21: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/21.jpg)
21Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Hierarchical routeing
� The routeing tables grow proportionally with the network size.
� Large networks can be organised hierarchically into the regions, further the regions into clusters, clusters into zones, the zones into groups, so on.
� The optimal number of layer for an N router subnet is lnN, and each router requires elnNentries for its routeing table
![Page 22: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/22.jpg)
22Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Internetworking
� Layer 1 at bit level: Repeaters � Layer 2 at frame level: Bridges� Layer 3 at packet level: Routers
� Layer 4 at byte streams level: transport gateway
� Layer 5: application gateway above level 4
![Page 23: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/23.jpg)
23Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Tunnelling
� The source and destination hosts are the same type of networks, but there is a different network in between
� The example shows that two Ethernets are interconnected by a WAN
� Tunnelling technique: put the IP packet into an encapsulating packet before sending at the source router and take out the IP packet from the encapsulating packet at the destination router
![Page 24: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/24.jpg)
24Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Internet Routeing
� Routing through an internet is similar to routing within a single subnet, but with some added complications
� The example shows an internet and an graph of the internet
� There is a two-level routing algorithm: interior gateway protocol and exterior gateway protocol
![Page 25: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/25.jpg)
25Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Fragmentation
� Each network imposes some maximum size on its packets due to:• Hardware• Operating systems• Protocols• Compliance with some
standard• Reduce errors
� The example shows two fragmentation strategies
![Page 26: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/26.jpg)
26Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Fragmentation example
![Page 27: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/27.jpg)
27Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
The Internet
� A collections of subnetworks or Autonomous Systems (ASes)
� Backbones consist of high bandwidth lines and routers
� Then the regional or national networks attached to the backbones
� Then, LANs at university, companies and ISP
� All use Internet Protocol (IP)� In theory datagrams are up to
64 Kbytes, but in practice 1500 bytes
� Provide best effort service
![Page 28: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/28.jpg)
28Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
The IP protocol
� Version: 4� IHL: Internet Header Length� DF: Don’t fragment� MF: More fragment
� Option code: one bytes� Option length: one bytes� Option data: less than 40
bytes, normally a few bytes
![Page 29: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/29.jpg)
29Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
IP addressing
![Page 30: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/30.jpg)
30Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Special IP addresses
![Page 31: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/31.jpg)
31Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Subnets and subnet masks
• At University of Surrey (UniS)network number: netmask:131.227.0.0 255.255.255.0
![Page 32: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/32.jpg)
32Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
CIDR - Classless InterDomain Routeing
� In 1996, 100,000th network was connected.� Class A is too large (16 million), class C is too small (256),
class B is just right (65,536).� In Class C, use 10 bit instead of 8 bits for the host
number, allowing 1024 hosts per network.� The CIDR is to solve the problem of address explosion.� The idea is to allocate remaining class C address in
variable size blocks of 1024 (RFC 1519). For example:• 194.0.0.0 to 195.255.255.255 for Europe• 198.0.0.0 to 199.255.255.255 for North America• 200.0.0.0 to 201.255.255.255 for Central and south America• 202.0.0.0 to 203.255.255.255 for Asia and the Pacific
![Page 33: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/33.jpg)
33Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
CDR – Classless InterDomain Routing
A set of IP address assignments.
5-59
![Page 34: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/34.jpg)
34Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
CIDR in binary format
� Cambridge: 194.24.0.0 - 194.24.7.255 mask: 255.255.248.011000010.00011000.00000000.00000000, 11000010.00011000.00000111.11111111
Mask: 11111111.11111111.11111000.00000000
� Oxford: 194.24.16.0 - 194.24.31.255 mask: 255.255.240.011000010.00011000.00010000.00000000, 11000010.00011000.00011111.11111111
Mask: 11111111.11111111.11110000.00000000
� Edinburgh: 194.24.8.0 - 194.24.11.255 mask: 255.255.252.011000010.00011000.00001000.00000000, 11000010.00011000.00001011.11111111
Mask: 11111111.11111111.11111100.00000000
� Coming Packet: 194.24.17.411000010.00011000.00010001.00000100 (Boolean-AND with the masks and compare)
Will match Edinburgh? No Oxford? Yes Cambridge? No
![Page 35: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/35.jpg)
35Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
NAT – Network Address Translation
Placement and operation of a NAT box.
![Page 36: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/36.jpg)
36Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
(RFC792) Internet Control Message Protocol (ICMP)
•The utility ping, traceroute and MTU discovery utilize the ICMP protocol
![Page 37: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/37.jpg)
37Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
(RFC826) Address Resolution Protocol (ARP)
� Routers need to know MAC / Physical address) for sending packets
� Each machine is assigned an IP address and subnet mask.
� It runs ARP to get mapping from IP to Ethernet address; and it caches the results.
� The request packet also carries its mapping
� Broadcast its mapping when it boots
� Use proxy ARP or default MAC address for remote addresses
![Page 38: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/38.jpg)
38Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
(RFC903) Reverse Address Resolution Protocol (RARP)
� Given an Ethernet address to find the IP address � This problem occurs when booting a diskless
workstation� It needs to broadcast the request� A RARP server is needed to reply to the request
![Page 39: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/39.jpg)
39Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
The interior gateway routing protocol: Open Shortest Path First (OSPF)
� Original: distance vector (RIP)
� 1979: link state protocols� 1988: IETF began work on
OSPF� 1990: became a standard� OSPF support three kinds of
connections and networks� Point-to-point lines between
exactly two routers� Multicast networks (LANs)� Multi-access networks
without broadcasting (WANs)
Requirements:� Published in Open literature� Support a variety of distance
metrics� Adaptive to changes in topology
automatically and quickly� Support routeing based on type of
services, and real time traffic� Support load balancing� Support for hierarchical systems� Some levels of security� Deal with routes connected to the
internet via a tunnel
![Page 40: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/40.jpg)
40Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
OSPF - Protocol messages
� When booting, a router sends HELEO message. Adjacent routers (designated routers in the each LANs) exchange information.
� Each router periodically floods link state information to each of its adjacent routers. Database description messages includes the sequence numbers of all the link state entries, sent at IP packets.
� Using flooding, each router informs all the other neighbour routers. This allows each router to construct the graph for its area and compute the shortest path.
![Page 41: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/41.jpg)
41Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
The exterior gateway routing protocol: Board Gateway Protocol (BGP)
� All an interior gateway protocol has to do is move packets as efficient as possible.
� Exterior gateway routers have to worry about politics a great deal.
� BGP is fundamentally a distance vector protocol, but quite different from most others such as RIP.
� Each BGP router keeps track of the exact path used. This also solves the count-to-infinity problem.
![Page 42: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/42.jpg)
42Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Advanced topics
� IP multicast � Mobile IP � Security � IPv6
![Page 43: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/43.jpg)
43Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
IP multicast
� IP multicast routing issues� Internet Group Management Protocol (IGMP)� Multicast addresses examples:
� 224.0.0.1 All systems on a LAN� 224.0.0.2 All routers on a LAN� 224.0.0.5 All OSPF routers on a LAN� 224.0.0.6 All designated OSPF routers on a LAN
� Multicast backbone (Mbone)
![Page 44: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/44.jpg)
44Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Routeing for mobile hosts
� Periodically foreign agents broadcast, or user request
� Mobile host registers: home address, MAC address, security info
� Foreign agent contacts home agent with security info
� Home agents examines the security info and acknowledges with a timestamp to let proceed
� Foreign agent registers the mobile host after receiving the acknowledgement
![Page 45: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/45.jpg)
45Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Security firewalls
� Two routers do packet filtering� The inside one checks outgoing packets� The outside one checks incoming
packets� An application gateway does further
examination� This configuration is to make sure that no
packets get in or out without having to pass through the application gateway
� Packet filters are table driven, check the the raw packets
� The application gateway checks contents, message sizes, headers
![Page 46: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/46.jpg)
46Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
IPv6
� Support more host address� Reduce the size of the routing
table� Simplify the protocol to allow
routers to process packets fast� Better security (authentication
and privacy)� Type of service, real time data� Aid multicasting (allow scopes)� Mobility (roam without changing
address)� Allow the protocol to evolve� Permit coexist of old and new
protocols.
![Page 47: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/47.jpg)
47Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Extension Headers
IPv6 extension headers.
![Page 48: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/48.jpg)
48Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Extension Headers (2)
The hop-by-hop extension header for large datagrams (jumbograms).
The extension header for routing.
![Page 49: 5. Network Layer and Internetworking - University of …info.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_5.pdf · Network layer and internetworking ©Dr.Z.Sun ... „](https://reader033.fdocuments.in/reader033/viewer/2022052918/5b840b407f8b9a934f8e9245/html5/thumbnails/49.jpg)
49Computer and Data Networks, 5. Network layer and internetworking ©Dr.Z.Sun
Summary
� Network layer design, Networks and services� Routing
• Shortest path routing (Dijkstra’s algorithm)• Distance vector routing • Link state routing
� The Internet • IP protocol• IP address• ICMP• Subnet • CIDR
� Advanced topics: multicast, Mobile IP, Security, IPv6