Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
ELEC3030 (EL336) Computer Networks S Chen How Networks Differ • Differences that can occur at network layer, which makes internetworking difficult: • It is impossible to resolve all differences, and the solution is to take a simple approach (as in the Internet) 131 ELEC3030 (EL336) Computer Networks S Chen Internetworking • Problem: Networks with different protocol stacks → how to let them talk to each other? • Nonsolution: Why not enforce all networks to run same protocol stack? → ask for troubles ! and this is effectively saying no progress is allowed • Solution: Construct some gateways that connect different kinds of networks – Repeaters or hubs at physical layer: Mainframe operate on bits, do not understand protocols, just regenerate signals SNA network ATM network – Bridges or switches at data link layer: operate on frames, examine MAC addresses, do minor protocol Router Switch translation, e.g. Ethernet to 802.11 FDDI – Multiprotocol router at network Notebook ring computer layer: operate on packets, translate Connection Ethernet 802.11 between different packet formats, to Internet possibly split up packets – Transport gateways at transport layer: coupling byte streams in different networks, interface between different transport connections – Application gateways at application layer: translate message semantics between OSI and TCP/IP networks 132 ELEC3030 (EL336) Computer Networks S Chen Internetworking at Network Layer • With a router, packet is extracted from frame and address in packet is used to decide where to send it → so router has to understand network protocols Legend Header Packet Trailer Switch Router S D LAN 1 LAN 2 (a) S D LAN 2 LAN 1 (b) • Switch or bridge do not understand network protocols. In a switch (or bridge) entire frame is transported on basis of its MAC address • Two basic internetworking approaches: connection-oriented concatenation of virtual-circuit subnets, and connectionless datagram internet style 133 ELEC3030 (EL336) Computer Networks S Chen Concatenated Virtual Circuits • A sequence of virtual circuits is set up from source through gateways (multiprotocol routers) to destination SNA Multiprotocol router 1 X. 25 M M ATM Router OSI M M 2 Host End-to-end concatenated virtual circuits Each gateway maintain tables telling which virtual circuits pass through it, where they are to be routed and what new virtual circuit number is • If one of constituent subnets does not support virtual circuits, simple concatenation becomes hard 134 ELEC3030 (EL336) Computer Networks S Chen Using Datagram • This connectionless internetworking approach is similar to datagram service in subnets 1 M M Packets travel individually and can take different routes Router M M 2 Multiprotocol router Host • Main problem: Addressing – different networks use completely different address systems. How do you address a host in a IP subnet when you are in a SNA subnet? • Solution: Don’t solve it, instead consider possibly some universal network protocol, e.g. IP, which can be carried through many networks 135 ELEC3030 (EL336) Computer Networks S Chen Tunneling • Solving general internetworking problem is extremely hard, but thing becomes easier if source and destination are on same type of subnet – tunnelling can be used Acts like a serial line Ethernet in Paris Multiprotocol router Tunnel Ethernet in London WAN 1 2 Header IP Ethernet frame IP IP packet inside payload field of the WAN packet IP Ethernet frame • Multiprotocol router simply places source host’s packet inside payload of WAN packet and sends through • Essentially, what between two hosts’ subnets, WAN, can be seen as a “tunnel” extending from one multiprotocol router to the other 136 ELEC3030 (EL336) Computer Networks S Chen Internetworking Routing A • Routing through an internetwork is similar to routing within a subnet but with added complications • Two-level routing algorithm needed 2 A 1 C B B 3 (Multiprotocol) router D C D E Network 4 – Interior gateway protocol used (a) within each network – Exterior gateway protocol used between networks F 5 E F (b) • Thus, one has intranetwork routing and internetwork routing • Consider an internet packet starts out from its LAN addressed to the local multiprotocol routine (in the MAC layer header) – After the packet has reached the local router, the network layer decides which mutliprotocol router to forward the packet to using its own routing table – If that router can be reached using the packet’s native network protocol, the packet is directly forward there – Otherwise, it is tunnelled there (see previous slide), encapsulated in the protocol required by the intervening network 137 ELEC3030 (EL336) Computer Networks S Chen Fragmentation • Different networks have different maximum packet sizes, and solution is to allow gateway to split a packet into smaller ones → fragmentation Network 1 Network 2 Packet G1 G2 G1 fragments a large packet G3 G2 reassembles the fragments G4 G3 fragments again G4 reassembles again (a) Packet G1 G1 fragments a large packet G2 G3 G4 The fragments are not reassembled until the final destination (a host) is reached (b) • Transparent fragmentation: “small-packet” network splits packet and recombines fragments back. Others do not need to know • Nontransparent fragmentation: destination host recombines fragments back 138 ELEC3030 (EL336) Computer Networks S Chen Fragmentation → Reassembly • A fragment may be fragmented again by successive intermediate networks → when a fragment arrives at destination, we have to know exactly where it fits into original packet • Solution: requires two sequence fields in header, original packet number and fragment number Number of the first elementary fragment in this packet Packet number 27 End of packet bit 0 1 A B 1 byte C D E F G H I 27 8 J Header (a) 27 0 0 A B C D E F G H Header 1 I J Header (b) 27 0 Header 0 A B C D E 27 5 Header 0 F G H 27 8 1 I J Header (c) 139 ELEC3030 (EL336) Computer Networks S Chen Firewalls • Sometimes it is better not all your computers can be easily reached by others, or vice versa → firewall Application gateway Backbone Packet filtering router Corporate network Packet filtering router Connections to outside networks Security perimeter Inside LAN Outside LAN Firewall • Packet filter: standard router with extra functionality to inspect packets → Those packets meeting some criterion are forwarded normally, and those failed are dropped • Application gateway: operates at application level 140 ELEC3030 (EL336) Computer Networks S Chen Summary • Internetworking in general • Internetworking at network layer Concatenated virtual circuits Connectionless internetworking Tunnelling Internetwork routing • Transparent and nontransparent fragmentation, reassembly • Firewalls 141