TCP/IP & LAN Oct 2007 - H. Sailer A C

B D

E

10/19/2017 TCP/IP & Ethernet LAN Page 1 TCP/IP illustrated, Vol 1

• Muddle though the book, chapter by chap • General Internet backbone design • • IXIA box demonstration • Configuration of Cisco 2950 Lan switch • IP Subnetwork address • Autonomous System, BGP • IP L3 Routers • TCP layer 4

10/19/2017 TCP/IP & Ethernet LAN Page 2 Where to go for more info

• IETF - Internet Engineering Task Force - www.ietf.org • Wikipedia - an online encylopedia – www.wikipedia.org http://en.wikipedia.org/wiki/Tcp/ip • ATM, Frame Relay, MPLS - http://www.mfaforum.org/ • http://www.cisco.com/univercd/cc/td/doc/cisintwk/ • http://www.cisco.com/univercd/home/home.htm • http://www.bgp4.as/ Border Gateway Protocol Stuff • http://www.iol.unh.edu/ University of New Hampshire • http://williamstallings.com/ Great author of TCP books • http://lw.pennnet.com/home.cfm Lightwave Magazine • http://www.ethernetalliance.org/home • http://www.kegel.com Dan Kegel Networking Guru • http://www.ethermanage.com/ethernet/ethernet.html • http://www.tcpipguide.com/index.htm

10/19/2017 TCP/IP & Ethernet LAN Page 3 47% of adults have broadband at home

10/19/2017 TCP/IP & Ethernet LAN Page 4 10/19/2017 TCP/IP & Ethernet LAN Page 5 10/19/2017 TCP/IP & Ethernet LAN Page 6 10/19/2017 TCP/IP & Ethernet LAN Page 7 The Internet Where do IP address Society come from? ( non-profit ) www.isoc.org

Internet Internet Internet Architecture Engineering Corporation Board Task Force Assigned IAB IETF Names & Numbers www.iab.org www.ietf.org www.icann.org

10/19/2017 TCP/IP & Ethernet LAN Page 8 • Internet Society - provides a corporate governance to oversee the operation of individual groups, to accept input from outside, and delegate on policy issues. • Internet Engineering Task Force (IETF) - is a loosely knit group of people with day jobs to design the operation of the internet standards, the RFC’s (request for comments). • Internet Corporation for Assigned Names and Numbers (ICANN) – oversee’s the assignments of IP addresses, and registration of Domain Names.

10/19/2017 TCP/IP & Ethernet LAN Page 9 V1.1 17 Sep 99 The ICANN-GAC Organization

Government Advisory Dept of Commerce Committee (GAC) MoU NTIA CRADA ICANN Interim NIST Board (10) Plenary GAC ICANN <$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$<$ [21 permanent] Secretariat Secretariat Fund Outside (NOIE) Raising Counsel (GIP) ICANN Website Comments Jones Day GAC Website Convergence IANA Website Member Internet Assigned AdHoc Group Nations Numbers Authority 1 director per region (3) Fair Practices Argentina Committee Domain Name Supporting Organization Armenia Australia At-Large Membership Address Supporting Organization ccTLD registries … 3 seats [non-functional] Names Constituency Yemen ccTLD Secretariat Committee At-Large Council MoU Signatories [AF NIC] Council (19) (50 active, (ARIN, RIPE, APNIC) 1 seat (18) gTLD registries 200+ Constituency 3 each Web site potential) Individuals (>5000) Comments On-line 3 seats 2 Council Address Council Secretariat Comments Commercial and Activities seats per 5 (9) WG-A business entities [Because the GAC is a closed, regions, 8 Dispute Announce site Constituency at-large, <2 secret activity, it's internal Resolution per region Policy structure isn't fully known.] 3 seats General General ISP and connectivity Comments Comments Assembly Assembly providers Argentina Mexico Asia Pacific Comments Constituency Armenia Morocco Telecommunity (APT) WG-B 3 seats Australia Netherlands European Union Famous Trade- Membership Advisory Comments Non-commercial Austria New Zealand International Marks domain name holders Bangladesh Niue Telecommunication Committee Protocol Supporting Organization Constituency Belgium Norway Union (ITU) Comments Brazil Papua New Guinea Organisation for Economic 3 seats Canada Registrars Peru Cooperation and Comments MoU Signatories WG-C Constituency Chile Portugal Development (OECD) (ITU, ETSI, IETF, W3C) New gTLDs Cyprus Singapore South Pacific Forum Czech Rep. Slovenia Secretariat (SPFS) WG-C1 3 seats 3 each Comments Trademark, other Denmark Spain World Intellectual Property Advisory Committee on Comments intellectual property Finland Sri Lanka Organisation (WIPO) Independent Review Protocol Council WG-C2 and anti-counterfeiting France Sweden Secretariat Comments interests Constituency [non-functional] (12) WG-C3 Gambia Switzerland Comments WG-D Germany Taiwan WG-D1 Business Plan Comments Ireland Tonga See and Internal WG-D2 Italy General Comments additional Tuvalu WG-E Procedures Comments Japan United Kingdom Assembly Global detail Korea USA DNS Root Server Awareness and Outreach Latvia Vatican City State Advisory Committee Comments Libya Vietnam Malaysia Yemen Comments 10/19/2017 TCP/IP & Ethernet LAN Page 10 Domain names on the Internet

10/19/2017 TCP/IP & Ethernet LAN Page 11 Domain Name System (DNS)

• How to convert a URL into an IP adrs? • World is broken up into top domains • .COM, .GOV, .ORG, .NET, .MIL, etc • Root Servers control top level domains • Each ZONE has a “Authoritative Name server” • Each ISP has a DNS cache • Each PC maintains it’s own cache • Verisign controls the .com domain • Verisign.com naming-services • www.root-servers.org

10/19/2017 TCP/IP & Ethernet LAN Page 12 Root Servers at top of Domain Zone Server

Zone Server

ISP Administrator adds New URL’s to DB

PC end user DNS Cache Server

10/19/2017 TCP/IP & Ethernet LAN Page 13 Root Servers

10/19/2017 TCP/IP & Ethernet LAN Page 14 Goal is end to end Host A Communication Host B Applications Applications Email, FTP Email, FTP TCP TCP Transport Guaranteed Transport IP Delivery IP Network Network LAN Layer Global LAN Layer Ethernet Addressing Token Ring

Physical Physical

LAN Network Cloud T.R. LAN

Router Router 10/19/2017 TCP/IP & Ethernet LAN Page 15 Layered Protocol Architecture

• Modules arranged in a vertical stack • Each layer in stack: – Performs related functions – Relies on lower layer for more primitive functions – Provides services to next higher layer – Communicates with corresponding peer layer of neighboring system using a protocol

10/19/2017 TCP/IP & Ethernet LAN Page 16 User Apps Data Encapsulation Web, Email

Guaranteed User Data Delivery Application

TCP Routing Header Layer 4

IP MAC Header Layer 3 Address

Network Header Layer 2

Ethernet, ATM, Frame Relay, PPP, each different

10/19/2017 TCP/IP & Ethernet LAN Page 17 10/19/2017 TCP/IP & Ethernet LAN Page 18 Example: File transfer

• Requires a data path to exist • Tasks: – Activate data communication path – Source determines that destination is ready – File transfer app destination file management app is ready store file for user – File format conversion

10/19/2017 TCP/IP & Ethernet LAN Page 19 Figure 2-8

10/19/2017 TCP/IP & Ethernet LAN Page 20 10/19/2017 TCP/IP & Ethernet LAN Page 21 Figure 2-10

Skip to Page 34

10/19/2017 TCP/IP & Ethernet LAN Page 22 Layer 2 LAN Topics

• Ethernet LAN - Layer 2 in the protocol stack • PHY layer - Twisted Pair Copper, symbol coding • Data Link Layer - frame format and bit ordering • 48 Bits of Addressing at MAC Layer • Bridging concepts - Transparent bridging • Spaning Tree - pruning the tree of redundent paths • LAN Switching - same as bridging, yet faster • VLAN Tags - why we use them (see Cisco Handouts) • VLAN Trunking - Inter_Switch_Link protocol

10/19/2017 TCP/IP & Ethernet LAN Page 23 Each Adaptor comes with a Driver written by the vendor

User Application (Web, email)

Operating TCP/IP Protocol Stack System

NDIS Driver from NIC vendor

10/19/2017 TCP/IP & Ethernet LAN Page 24 • Ethernet MAC Frame - Data link layer 2 – Preamble & Start of Frame delimiter – Source & Destination MAC address 48 bits – Length type field – Logical Link Control (LLC) – Data portion (encapsulates TCP/IP) – Cycle Redundency Check CRC-32 (FCS)

A B C D

PRE SD DA SA Len DATA FCS

10/19/2017 TCP/IP & Ethernet LAN Page 25 7 octets 1 6 octets 6 octets 2

S Destination Source Preamble Len D Address Address

46 to 1500 octets 0 to 45 4 octets

Frame Check LLC and User Data PAD Sequence

The first two fields in the frame carry 48-bit addresses, called the destination and source addresses. The IEEE controls the assignment of these addresses by administering a portion of the address field. The IEEE does this by providing 24- bit identifiers called "Organizationally Unique Identifiers" (OUIs), since a unique 24-bit identifier is assigned to each organization that wishes to build Ethernet interfaces. The organization, in turn, creates 48-bit addresses using the assigned OUI as the first 24 bits of the address. This 48-bit address is also known as the physical address, hardware address, or MAC address.

10/19/2017 TCP/IP & Ethernet LAN Page 26 PRE SD DA SA Len DATA FCS

Preamble (PRE)— Consists of 7 bytes. The PRE is an alternating pattern of ones and zeros that tells receiving stations that a frame is coming, and that provides a means to synchronize the frame-reception portions of receiving physical layers with the incoming bit stream. Start-of-frame delimiter (SOF)— Consists of 1 byte. The SOF is an alternating pattern of ones and zeros, ending with two consecutive 1-bits indicating that the next bit is the left-most bit in the left-most byte of the destination address.

10101010 10101010 … 10101011

10/19/2017 TCP/IP & Ethernet LAN Page 27 PRE SD DA SA Len DATA FCS

Destination address (DA)— Consists of 6 bytes. The DA field identifies which station(s) should receive the frame. The left-most bit in the DA field indicates whether the address is an individual address (indicated by a 0) or a group address (indicated by a 1). The second bit from the left indicates whether the DA is globally administered or unique throughout the world (indicated by a 0), or locally assigned and administered by (indicated by a 1). The remaining 46 bits are a uniquely assigned value that identifies a single station, a defined group of stations, or all stations on the network. “FF FF FF FF FF FF” is a broadcast address, packet is to be received by all stations on the LAN. Who To

10/19/2017 TCP/IP & Ethernet LAN Page 28 22 Bit Vendor ID 24 bit Station ID

1x is Broadcast address 01 is Local assignment MAC Address 00 is Unique in world Each vendor pulls a block of 16 Million station ID’s and assigns them sequentially to each adaptor they make. If a large vendor needs more, they get a a second Vendor ID number.

Vendors Adaptor Each list list IEEE Vendor

10/19/2017 TCP/IP & Ethernet LAN Page 29 PRE SD DA SA Len DATA FCS

Source addresses (SA) — Consists of 6 bytes. The SA field identifies the sending station. The SA is always an individual address, the left-most bit in the SA field is always 0. Length/Type — Consists of 2 bytes. This field indicates either the number of MAC-client data bytes that are contained in the data field of the frame, or the frame type ID if the frame is assembled using an optional format. If the Length/Type field value is less than or equal to 1500, the number of LLC bytes in the Data field is as long as the Length/Type field value. Conforms to IEEE 802.3 style Frame. If the Length/Type field value is greater than 1536, the frame is an optional “Type” frame, the Len/Type field value identifies the particular type of frame being sent. Ethernet-II type Frame. A type field = 800 hex is an IP packet. A type field = 806 hex is an ARP request.

10/19/2017 TCP/IP & Ethernet LAN Page 30 PRE SD DA SA Len DATA FCS

Data—Is a sequence of n bytes of any value, where n is less than or equal to 1500. If the length of the Data field is less than 46, the Data field must be extended by adding a filler (a pad) sufficient to bring the Data field length to 46 bytes. Frame check sequence (FCS)—Consists of 4 bytes. This sequence contains a 32-bit cyclic redundancy check (CRC) value, which is created by the sending MAC and is recalculated by the receiving MAC to check for damaged frames. The FCS is generated over the DA, SA, Length/Type, and Data fields.

User Data

10/19/2017 TCP/IP & Ethernet LAN Page 31 Why did they choose a 48 bit address field ? The total number of possible Ethernet Stations allowed by a 48 bit address is 230 Trillion possible assignements. It is not likely that we would find one LAN with this number of stations attached. The MAC address are assigned like serial numbers. Each Ethernet interface manufactured has an address that is unique in the world. This makes administration easy at the MAC level, but we have to set each PC with an IP address anyway, unless using a DHCP server. Creates some interesting problems when we try and create a lookup table in RAM for Network devices such as bridges, switches. A Hash table makes this lookup process managable.

10/19/2017 TCP/IP & Ethernet LAN Page 32 10 bit index 22 Bit Vendor ID 24 bit Station ID Match upper address bits

Port V

Hit if there is a match, also check to see if there are sister entries in the Index next page

The bottom (least significant) bits, say 10 bits, are used as in index into a multi-page table. Each time an address is looked up, there is a chance that there could be multiple entries with the same index value. The table is used as a cache lookup, the remaining bits of the address are stored as data, and “Matched” to see if we have a hit. If there are multiple entries, the next page is checked.

10/19/2017 TCP/IP & Ethernet LAN Page 33 Ethernet LAN With Bridge

A B C D

Bridge SA=A, DA=C

Each computer has a 48 bit Ethernet MAC address. When a Host computer sends out the first packet, the Bridge sends this packet out all available ports. The bridge “Learns” on which port a MAC destination resides, when it sees each packet cross, by looking at the source address in each packet, and constructs a table. Next time a packet is sent out the Bridge performs a filtering function as to whether to forward a packet to the other LAN segments.

10/19/2017 TCP/IP & Ethernet LAN Page 34 Ethernet Bridge

• Bridge is nothing more than just a Microprocessor with Ram, ROM, and 2 or more Ethernet Ports (including MAC), and Firmware. • A Layer 2 switch is just a fancy Bridge, possibly with HW acceleration, using ASICs to speed the lookup and forward process. • Layer2 switch looks only at the MAC address, does not give a damn about IP address, or any data content. • Learns from current traffic, and auto-ages or removes table entries that show no activity over 5 minutes, or other period set by network admin. • Must provide a loop free topology, using Spanning Tree

10/19/2017 TCP/IP & Ethernet LAN Page 35 Bridge

Spanning Tree algorithm must eliminate LAN Loops. No Redundant paths are available Must Cut

10/19/2017 TCP/IP & Ethernet LAN Page 36 Flow Control Full-duplex operation requires concurrent implementation of the optional flow-control capability that allows a receiving node (such as a network switch port) that is becoming congested to request the sending node (such as a file server) to stop sending frames for a selected short period of time. Control is MAC-to-MAC through the use of a “Pause Frame” that is automatically generated by the receiving MAC. If the congestion is relieved before the requested wait has expired, a second pause frame with a zero time-to-wait value can be sent to request resumption of transmission.

A Pause B

Data

10/19/2017 TCP/IP & Ethernet LAN Page 37 A B

The full-duplex operation and its companion flow control capability are both options for all Ethernet MACs and all transmission rates. Both options are enabled on a link-by-link basis, assuming that the associated physical layers are also capable of supporting full-duplex operation. Pause frames are identified as MAC control frames by an exclusive assigned (reserved) length/type value. They are also assigned a reserved destination address value to ensure that an incoming pause frame is never forwarded to upper protocol layers or to other ports in a switch.

10/19/2017 TCP/IP & Ethernet LAN Page 38 Ethernet Switched Networks can scale as long as you don’t need redundant paths

10/19/2017 TCP/IP & Ethernet LAN Page 39 • Application layer - User Data • Transmission Control Protocol • Network layer – Internet Protocol • Link Layer • Physical Layer User Data

TCP TCP/IP Header

Layers IP Header

Network LAN Header

10/19/2017 TCP/IP & Ethernet LAN Page 40 Operation of LAN, TCP and IP • IP implemented in end systems and routers, relaying data between hosts • Each host on subnetwork has unique IP address, each Router port has IP adrs • TCP implemented only in end systems, assuring reliable delivery of blocks of data

IP=1.2.4.x IP=1.2.3.x C IP=1.2.3.1 IP=1.2.4.1 A

IP=1.2.4.20 IP=1.2.3.10 MAC=11.88.33.44.55.01 MAC=11.22.77.44.55.03 D IP=1.2.3.2 IP=1.2.4.2 B MAC=...05 MAC=...06

MAC=11.22.33.66.55.04 MAC=99.22.33.44.55.02

10/19/2017 TCP/IP & Ethernet LAN Page 41 Direct Peer to Peer Quest UUNet Tier 1 OC-48 Tier 1 NAP’s OC-12 Tier 2 T3 ISP_B POP POP POP T3’s Web Hosting Center ILEC CO DSLAM T1 DSL

CP CP 10/19/2017 TCP/IP & Ethernet LAN Page 42 0 4 8 16 31 Type of Version IHL Total Length Service Fragment Identification Flags offset

Time to Live Protocol Header Checksum

Source IP Address = 32 bit

Destination IP Address = 32 bit

IPv4 Header

10/19/2017 TCP/IP & Ethernet LAN Page 43 IPv4 32 bit Address Class assignments

10/19/2017 TCP/IP & Ethernet LAN Page 44 IP CLASS A address assignments

• 03 May 94 General Electric Company • 04 Dec 92 Level 3 Communications, Inc. • 09 Aug 92 IBM • 12 Jun 95 AT&T Bell Laboratories • 13 Sep 91 Xerox Corporation • 15 Jul 94 Hewlett-Packard Company • 16 Nov 94 Digital Equipment Corporation • 17 Jul 92 Apple Computer Inc. • 18 Jan 94 MIT • 19 May 95 Ford Motor Company • 25 Jan 95 UK Ministry of Defence • 32 Jun 94 AT&T Global Network Services • 34 Mar 93 Halliburton Company • 35 Apr 94 MERIT Computer Network • 40 Jun 94 Eli Lily and Company • 44 Jul 92 Amateur Radio Digital Communications • 48 May 95 Prudential Securities Inc. • 52 Dec 91 E.I. duPont de Nemours and Co., Inc. • 54 Mar 92 Merck and Co., Inc. • 56 Jun 94 U.S. Postal Service

10/19/2017 TCP/IP & Ethernet LAN Page 45 0 4 8 16 31 Type of Version IHL Total Length Version = IPv4 Service Fragment Identification Flags offset

IHL = 20 bytes Time to Live Protocol Header Checksum

Source IP Address = 32 bit

Destination IP Address = 32 bit

IPv4 Header • IHL = IP Header Length • TOS = Type of Service (like QoS) • Total Length of IP Packet (all data) • Identification, each packet has increasing number • FLAGS, • Fragment Offset for fragmented Packets (MTU limits) • TTL = Time to live, down count through router hops • Protocol

10/19/2017 TCP/IP & Ethernet LAN Page 46 0 4 8 16 31 Type of Version IHL Total Length Service Fragment Identification Flags offset

Time to Live Protocol Header Checksum

Source IP Address = 32 bit

Destination IP Address = 32 bit

Version IPv4 Header The first header field in an IP packet is the 4-bit version field. For IPv4, this has a value of 4 (hence the name IPv4). Internet Header Length (IHL) The second field is a 4-bit Internet Header Length (IHL) telling the number of 32-bit words in the header. Since an IPv4 header may contain a variable number of options, this field specifies the size of the header (this also coincides with the offset to the data). The minimum value for this field is 5 (rfc791), which is a length of 5×32 = 160 bits. Being a 4-bit field the maximum 10/19/2017 TCP/IP & Ethernet LAN Page 47 0 4 8 16 31 Type of Version IHL Total Length Service Fragment Identification Flags offset

Time to Live Protocol Header Checksum

Source IP Address = 32 bit

Destination IP Address = 32 bit

Type of Service (TOS) IPv4 Header bits 0-2: precedence bit 3: 0 = Normal Delay, 1 = Low Delay bit 4: 0 = Normal Throughput, 1 = High Throughput bit 5: 0 = Normal Reliability, 1 = High Reliability bits 6-7: Reserved for future use This field is now used for DiffServ and ECN. The original intention was for a sending host to specify a preference for how the datagram would be handled as it made its way through an internetwork. For instance, one host could set its IPv4 datagrams' TOS field value to prefer low delay, while another might prefer high reliability. In practice, the TOS field has not been widely implemented. These bits have been redefined, most recently through DiffServ working group in the IETF and the Explicit Congestion Notification codepoints (see RFC 3168).

10/19/2017 TCP/IP & Ethernet LAN Page 48 0 4 8 16 31 Type of Version IHL Total Length Service Fragment Identification Flags offset

Time to Live Protocol Header Checksum

Source IP Address = 32 bit

Destination IP Address = 32 bit

Total Length IPv4 Header This 16-bit field defines the entire datagram size, including header and data, in bytes. The minimum-length datagram is 20 bytes (20 bytes header + 0 bytes data) and the maximum is 65,535 — the maximum value of a 16-bit word. The minimum size datagram that any host is required to be able to handle is 576 bytes, but most modern hosts handle much larger packets. Sometimes subnetworks impose further restrictions on the size, in which case datagrams must be fragmented. Fragmentation is handled in either the host or packet switch in IPv4. Identification This field is an identification field and is primarily used for uniquely identifying fragments of an original IP datagram. Some experimental work has suggested using the ID field for other purposes, such as for adding packet-tracing information to datagrams in order to help trace back datagrams with spoofed source addresses. 10/19/2017 TCP/IP & Ethernet LAN Page 50 0 4 8 16 31 Type of Version IHL Total Length Service Fragment Identification Flags offset

Time to Live Protocol Header Checksum

Source IP Address = 32 bit

Destination IP Address = 32 bit

Flags IPv4 Header A 3-bit field follows and is used to control or identify fragments. They are (in order, from high order to low order): Reserved; must be zero. As an April Fools joke, proposed for use in RFC 3514 as the "Evil bit". Don't Fragment (DF) More Fragments (MF) If the DF flag is set and fragmentation is required to route the packet then the packet will be dropped. This can be used when sending packets to a host that does not have sufficient resources to handle fragmentation. When a packet is fragmented all fragments have the MF flag set except the last fragment, which does not have the MF flag set. The MF flag is also not set on packets that are not fragmented — clearly an unfragmented packet can be considered the last fragment.

10/19/2017 TCP/IP & Ethernet LAN Page 51 0 4 8 16 31 Type of Version IHL Total Length Service Fragment Identification Flags offset

Time to Live Protocol Header Checksum

Source IP Address = 32 bit

Destination IP Address = 32 bit

Fragment Offset IPv4 Header The fragment offset field, measured in units of 8-byte blocks, is 13-bits long and specifies the offset of a particular fragment relative to the beginning of the original unfragmented IP datagram. The first fragment has an offset of 0. This allows a maximum offset of 65,528 ( ) which would exceed the maximum IP packet length of 65,535 with the header length included.

10/19/2017 TCP/IP & Ethernet LAN Page 52 0 4 8 16 31 Type of Version IHL Total Length Service Fragment Identification Flags offset

Time to Live Protocol Header Checksum

Source IP Address = 32 bit

Destination IP Address = 32 bit

Time To Live (TTL) IPv4 Header An 8-bit time to live (TTL) field helps prevent datagrams from persisting (e.g. going in circles) on an internetwork. Historically the TTL field limited a datagram's lifetime in seconds, but has come to be a hop count field. Each packet switch (or router) that a datagram crosses decrements the TTL field by one. When the TTL field hits zero, the packet is no longer forwarded by a packet switch and is discarded. Typically, an ICMP message (specifically the time exceeded) is sent back to the sender that it has been discarded. The reception of these ICMP messages is at the heart of how traceroute works. Protocol This field defines the protocol used in the data portion of the IP datagram. The Internet Assigned Numbers Authority maintains a list of Protocol numbers and were originally defined in RFC 790. Common protocols and their decimal values are shown below (see Data). 10/19/2017 TCP/IP & Ethernet LAN Page 53 0 4 8 16 31 Type of Version IHL Total Length Service Fragment Identification Flags offset

Time to Live Protocol Header Checksum

Source IP Address = 32 bit

Destination IP Address = 32 bit

Header Checksum IPv4 Header The 16-bit checksum field is used for error-checking of the header. At each hop, the checksum of the header must be compared to the value of this field. If a header checksum is found to be mismatched, then the packet is discarded. Note that errors in the data field are up to the encapsulated protocol to handle — indeed, both UDP and TCP have checksum fields. Since the TTL field is decremented on each hop and fragmentation is possible at each hop then at each hop the checksum will have to be recomputed. The method used to compute the checksum is defined within RFC 791: The checksum field is the 16-bit one's complement of the one's complement sum of all 16-bit words in the header. For purposes of computing the checksum, the value of the checksum field is zero. 10/19/2017In other words, all 16-TCP/IPbit words & Ethernet are summed LAN together using one's Page 54 complement (with the checksum field set to zero). The sum is then one's complemented. This final value is then inserted as the checksum field.

Checksum Field

• Applied to data segment and part of the header • Protects against bit errors in user data and addressing information • Filled in at source • Checked at destination

10/19/2017 TCP/IP & Ethernet LAN Page 55 ToS – Type of Service

10/19/2017 TCP/IP & Ethernet LAN Page 56 Fragmentation and Reassembly

• Networks may have different maximum packet size • Router may need to fragment datagrams before sending to next network • Fragments may need further fragmenting in later networks • Reassembly done only at final destination since fragments may take different routes

10/19/2017 TCP/IP & Ethernet LAN Page 57 TCP and UDP

• TCP: – connection-oriented – Reliable packet delivery in sequence • UDP: – connectionless (datagram) – Unreliable packet delivery – Packets may arrive out of sequence or duplicated

10/19/2017 TCP/IP & Ethernet LAN Page 59 0 8 16 31

Source Port Destination Port

Sequence Number

Acknowledgement Number

Header Not Flags Window Size Length used

Checksum Urgent Pointer

TCP Header

10/19/2017 TCP/IP & Ethernet LAN Page 60 Above TCP are the Applications

• Well Known Ports (see www.ietf.org) • Each application on each Host has unique IP port number for example: – Http = port 80, – Email = port 110, – FTP = port 20, – = port 23

10/19/2017 TCP/IP & Ethernet LAN Page 62 10/19/2017 TCP/IP & Ethernet LAN Page 63 Figure 2.2

10/19/2017 TCP/IP & Ethernet LAN Page 64 How ARP works with LAN Address and IP Address

A B C D

ARP Request

Ethernet Ethernet Ethernet Ethernet Driver Driver Driver IP Driver ARP ARP ARP IP ARP The ARP request uses the broadcast feature of Ethernet LAN to ask all TCP stations “Do you have the IP address Name that I am seeking?”. If a station see’s Resolver it’s IP address, it will reply with MAC. FTP URL 10/19/2017 TCP/IP & Ethernet LAN Page 65 • The operation of ARP is straightforward. Let's say an IP-based station (station "A") with IP address 192.0.2.1 wishes to send data over the Ethernet channel to another IP-based station (station "B") with IP address 192.0.2.2. Station "A" sends a packet to the broadcast address containing an ARP request. The ARP request basically says "Will the station on this Ethernet channel that has the IP address of 192.0.2.2 please tell me what the address of its Ethernet interface is?" • Since the ARP request is sent in a broadcast frame, every Ethernet interface on the network reads it in and hands the ARP request to the networking software running on the station. Only station "B" with IP address 192.0.2.2 will respond, by sending a packet containing the Ethernet address of station "B" back to the requesting station. Now station "A" has an Ethernet address to which it can send data destined for station "B," and the high-level protocol communication can proceed.

10/19/2017 TCP/IP & Ethernet LAN Page 66 Which way does my data go? How does the Router know where to forward IP packets to?

10/19/2017 TCP/IP & Ethernet LAN Page 67 Routers

• Provide link between networks • Accommodate network differences: – Addressing schemes – Maximum packet sizes – Hardware and software interfaces – Network reliability

10/19/2017 TCP/IP & Ethernet LAN Page 68 Figure 2-7

10/19/2017 TCP/IP & Ethernet LAN Page 69 128.11.0.1 128.11.0.2 128.11.0.3 IP Subnet 128.11.0.0

Routing Table IP 128.47.0.0 Port 1 IP 128.11.0.0 Port 2 T1 Routing Table IP 128.11.0.0 Port 1 IP 128.47.0.0 Port 2 IP 139.10.0.0 Port 3

IP Subnet 128.47.0.0 128.47.0.1 128.47.0.2

10/19/2017 TCP/IP & Ethernet LAN Page 70 How do Routers Work?

• Consists of a Microprocessor, with some RAM, ROM, Network ports. • Cisco 2600 based on Motorola MC68360 • Builds table based on IP addresses Layer3 • Must “Advertise” attached IP subnetworks to all attached ports, “reachability” • RIP is a simple distance vector approach that calculates fewest number of hops as the best path to reach a destination.

10/19/2017 TCP/IP & Ethernet LAN Page 71 A If A has traffic with B, B shortest path works

T1

T1 R2 R3 T1 RIP based on hop count

R1 56K 56K R4

R5 C D IF C wished to talk with D RIP says R5 is best route Yet this may not be best!

10/19/2017 TCP/IP & Ethernet LAN Page 72 Routing Information Protocol (RIP)

• RIP deamon in each router constantly sends “control plane” packets to neighbor routers, while data is being forwarded. • The Routing table is built up over time, routing loops are removed by various algorithms. • Each Hop counts as a “cost” to determine the best path to take. No knowledge of traffic loads taken into effect.

10/19/2017 TCP/IP & Ethernet LAN Page 73 A Link State Routing says B that state of link matters

T1

T1 R2 R3 T1

R1 56K 56K R4

R5 C D OSPF and ISIS are examples of Link State Routing

10/19/2017 TCP/IP & Ethernet LAN Page 74 Open Shortest Path First (OSPF)

• Uses Link State metrics to determine which is the best path. • Takes into current traffic patterns, hop count, delay. • Best Interior network routing protocol

10/19/2017 TCP/IP & Ethernet LAN Page 75 The Inter-Network links use BGP routers BGP AS 2 BGP Big Corp

R AS 1 R R

BGP AS 3 BGP State Univ The Internet is broken up into domains of Autonomous systems Each with their own AS number

10/19/2017 TCP/IP & Ethernet LAN Page 76 Border Gateway Protocol (BGP)

• Instead of using trusted partners, each peer router can be set with unique policies, some paths may be delibrately blocked. • Can be used to prevent unwanted “Transit Routes” where a neighbor takes a free ride through your network to get somewhere else on the Internet. • Uses security to talke with other routers.

10/19/2017 TCP/IP & Ethernet LAN Page 77 Internet Traffic

• 200+ Million Internet Users World 1999 • 435+ Million Internet Users World 2001 • Tier 1 Carriers cover United States • Largest Carriers directly interconnect • 10 Major Exchanges (MAE’s, NAP’s) • MAE East Wash DC, MAE West San Jose • Sprint NAP NJ, Ameritec NAP Chicago

10/19/2017 TCP/IP & Ethernet LAN Page 80 AT&T

MAE NAP MAE

Qwest

C&W

10/19/2017 TCP/IP & Ethernet LAN Page 81 Major ISP’s Overlap & Peer at Exchanges, sometimes peer directly between each other

MAE MAE UUNet West East

Qwest

CIX Cable & Wireless

Level 3 NAP AT&T NAP

10/19/2017 TCP/IP & Ethernet LAN Page 82 MFS Datanet - MAE East

• Metropolitan Area Ethernet • Major tie point for East coast, Wash DC • 2 gigabits/sec average load 1999 • No Routing, no default peering • No Transit - no traffic between other NAPs • ISP’s must arrange peering relations

10/19/2017 TCP/IP & Ethernet LAN Page 83 MAE provides only a Layer 2 connection LAN Peering between ISP’s is by agreement only

LAN BGP UUNet

Qwest MAE East Gov

Policy Server Router Nasa

10/19/2017 TCP/IP & Ethernet LAN Page 84 Route Server

• Route Server talks RIPE-181 language between itself, and the BGP routers. • Administrators of each ISP determine who there network will peer with, a policy decision. • Route Server simply redistributes the policies set up by Admins to all routers, instead of each router talking to all others directly.

10/19/2017 TCP/IP & Ethernet LAN Page 85 ISP 1 MAE uses FDDI to interconnect Routers ISP 2 Wan

Router

FDDI ring ISP 4 ISP 3 Layer 2 LAN

Route Server

10/19/2017 TCP/IP & Ethernet LAN Page 86 The RADb is a public registry of routing information for networks in the Internet. Hundreds of organizations that operate networks -- including ISPs, universities, and business enterprises -- publicly publish, or register, their routing policy and route announcements in the RADb to facilitate the operation of the Internet. Organizations throughout the world use the information in the RADb to troubleshoot routing problems, automatically configure backbone routers, generate access lists, and perform network planning.

Any organization worldwide may register in the RADb for a fee of $250 per year and any Internet user may query the RADb for free. Currently, the RADb receives about 150,000 queries per day from over 7,000 unique hosts. More than 1,800 organizations have registered their routing information in the RADb, with new organizations registering every day.

10/19/2017 TCP/IP & Ethernet LAN Page 87 Router Arbitration Data Base Merit - Michigan State Univ

Common Data Base (RIPE-181 Language) to cordinate all the Route Servers. The Route Servers control the BGP Routers The BGP routers control the flow into AS routing domains.

Don’t muck this one up.

Interesting things happen when they load a new set of rules, and theres a bug.

10/19/2017 TCP/IP & Ethernet LAN Page 88 ISP 1 ATM Layer2 Backbone switch ISP 2

Router

6 switches

ISP 3 Wan Moving to Stratacom BPS ISP 4 ATM Switch Year 2000

10/19/2017 TCP/IP & Ethernet LAN Page 89 ATM ATM

Core is ATM

10/19/2017 TCP/IP & Ethernet LAN Page 90 ATM is at Core of Internet

• Provides lowest round trip delay (60ms) • ATM switch have very small delay(us) • Fore Network ASX-1000 (circ Y2000) • Allows other services on same backbone • TDM traffic • Frame Relay • Native ATM traffic to large customers • IP encapsulation in ATM cells (RFC1577)

10/19/2017 TCP/IP & Ethernet LAN Page 91 Fore ASX-1000 ATM Switch 10 Gbps fabric OC-3c, OC-12c, OC-48c Ports

Today, several of the world's largest public IP service providers deploy FORE solutions as the transport core of their networks. In fact, some 80% of the packets traversing the World Wide Web are carried on a FORE switch node. 10/19/2017 TCP/IP & Ethernet LAN Page 92 IP Peer Conn ATM Peer Conn

Border Border Routr ATM DSL Gate Acces Way Transit Mux Routr Router

Transit Hub Hub Hub Access Modem R ATM XR ATM Router ATM ATM Pool

Transit Access XR Hub Hub Hub R Modem ATM ATM Router ATM ATM Pool

Transit DSL Gate T3 Leased Router Gate Gate Acces Way Line Way Way Mux Routr Customer Customer Routr Routr DSL ATM Customer

Frame T1 Leased Relay Line Cust Routr 10/19/2017 TCP/IP & Ethernet LAN Page 93 MAE East - Gigaswitch Aggregate Input Traffic www.mfsdatanet.com/MAE/East.html

10/19/2017 TCP/IP & Ethernet LAN Page 94 What happens when we go to DSL and Cable Modem?

• “Let’s Watch the Internet instead of TV” • More people on line - 100 Million? • Average speed 1+ megabit/sec • 100 Terabits/sec instead of 100 Gig. • 1000 times increase or more • A port into the Internet is expensive, a T3 at 45Mbps is $3,000 per month. • Web Caching is one Answer

10/19/2017 TCP/IP & Ethernet LAN Page 95 Web Content Cache Providers

Linux ISP • Akamai.com 4G Dram • Sandpiper.com Head end • Adero.com

Host Internet Website

Broadband Customer 10/19/2017 TCP/IP & Ethernet LAN Page 96 Akamai

• Dynamic Web Caching • Each server is PC runing Linux O/S • 10,000 Servers PIII with 2 to 4 Gig DRAM • Located at key Network Access Points • Supports Yahoo, Apple, CNN, Microsoft

10/19/2017 TCP/IP & Ethernet LAN Page 97 Cost of a T3 Port into Internet $$ Dollars per Month

45,000 PORT 40,000 Leased 35,000 Line 30,000 25,000 20,000 15,000 10,000 5,000 0 1998 2000 2002 2004

10/19/2017 TCP/IP & Ethernet LAN Page 98 Retail Frame Relay Networking Corporate Head T3 MCI T3 Office T3 Frame FR Relay FR CO Carrier Carrier POP FR Switch POP T1 ILEC T1 Local ILEC CO CO FR Switch Local CO CO DCS DCS

56K Retail Locations 56K Retail Loc

Node Node Node Node

Register Register Register Register

10/19/2017 TCP/IP & Ethernet LAN Page 99 Market Forecast by WAN Technology Leased Lines $27.7B $22.6B Network Service Market Frame Relay Worldwide 1997 and 2000 $6.8B Estimates

$3.9B X.25 $2.7B $2.6B ATM $1.6B SMDS $.242B $.128B $.167B

Sources: Vertical Systems Group 1997 and Data Comm 1998 Forecast

10/19/2017 TCP/IP & Ethernet LAN Page 100 Retail Frame Relay Networking Corporate Head ILEC’s can now carry Office Enhanced Service past Qwest LATA boundary CO T1

ILEC A Enhanced Service Local ILEC B CO Local CO CO ILEC FR Switch 56K 56K Retail Loc

Node Node Node Node

Register Register Register Register

10/19/2017 TCP/IP & Ethernet LAN Page 101 SONET Transmission Rates

• OC-3 155 Mbits/sec • OC-12 622 Mbits/sec • OC-48 2.5 Gigbit/sec • OC-192 9.9 Gigbit/sec

ADM

SONET RING

10/19/2017 TCP/IP & Ethernet LAN Page 102 Wave Division Multiplexing

• 32 wavelengths of OC-192 = 320 Gbps • 32, 64, or 128 wavelengths of light • 1.28 Tbits/sec on one fiber • 144 fibers in a 1/2 inch F.O. Cable • Multiple conduits along a path • Multiple Carriers with Rights of Way

10/19/2017 TCP/IP & Ethernet LAN Page 103 National Internet Carriers

• UUNet IP network 2.5 G => 10 Gig • Qwest IP network 2.5 G => 10 Gig • Level 3 IP network 2.5 G • Cable & Wireless IP network 2.5 G • Mesh Networks total 100 G

10/19/2017 TCP/IP & Ethernet LAN Page 104 UUnet

• Now owned by MCI (via MFS Datanet) • Carries 50% of the Internet Traffic • Biggest pipe used is OC-192 • Growth at 1000% per year • ATM core - ASX-1000 Fore Switches

10/19/2017 TCP/IP & Ethernet LAN Page 105 Year 1999

10/19/2017 TCP/IP & Ethernet LAN Page 106 Year 2000

10/19/2017 TCP/IP & Ethernet LAN Page 107 Qwest (merging with USWest)

• 25,000 Route Miles of Fiber Optic Conduit • Primarily along Railroad Rights of Way • 2 Conduits - one conduit has 96 fibers • OC-48 Internet Backbone (one fiber) • 150 Major City Points of Presence • 25 Cities getting local fiber loop

10/19/2017 TCP/IP & Ethernet LAN Page 108 QWEST purchased rights of way along railroad tracks,

Spanning more than 25,500 backbone route miles in North America, the Qwest broadband network has the largest bandwidth currently available. 10/19/2017 TCP/IP & Ethernet LAN Page 109 A locomotive pulls plow along the track to bury plastic conduit

6 Plastic Condiuts

Hydraulic Plow Direction of Travel Power Blade

10/19/2017 TCP/IP & Ethernet LAN Page 110 A locomotive pulls plow along the track to bury plastic conduit

Plastic Condiut Reels

Direction of Travel Plow Blade

10/19/2017 TCP/IP & Ethernet LAN Page 111 German made “Spider plow” adapts to any terrain

Can lay up to 3000 feet per hour under good conditions 10/19/2017 TCP/IP & Ethernet LAN Page 112 Level 3, Inc

• 16,000 route miles - 56 Major Cities • Each route 12 conduits • Each conduit can carry up to 400 fibers • $10 Billion funding completed • Provides Dark Fiber, leased line, IP • Co-location space for CLEC’s

10/19/2017 TCP/IP & Ethernet LAN Page 113 Cable & Wireless

• Purchased MCI’s Internet Service • National OC-192 Data Network • Fore ASX-1000 ATM switches at the core, PVC’s only, low latency 80 ms. • Cisco 12000 and 7500 Routers for aggregation • Web hosting (Barnes and Noble) • DSL Service via North Point Data CLEC

10/19/2017 TCP/IP & Ethernet LAN Page 114 Other Carriers

• AT&T merged with TCG, Cable Co’s • Frontier merged with Global Crossings • MCI & Sprint (long distance voice & data) • SBC & PACtel & Ameritec • Bell Atlantic & GTE (24 Qwest fibers)

10/19/2017 TCP/IP & Ethernet LAN Page 115 Where is the bottle neck? • Typically only one IXC POP per LATA • 20,000 CO’s in USA, 400 LATA’s • 50 CO’s per LATA • Mostly ILEC Fiber as access to the CO’s • Metromedia Fiber deal to B.A. CO’s

10/19/2017 TCP/IP & Ethernet LAN Page 116 The Avici Terabit Switch Router (TSR®) is the first switch router designed for the core of the 21st century public network. With its scalable architecture, TSR supports tens of gigabits today, and can scale to tens of terabits as bandwidth needs increase. Supporting up to 2240 OC-48 or 560 OC-192 connections, the TSR is optimized to take advantage of the huge increases in backbone bandwidth enabled through dense wave division multiplexing. In addition to providing industry leading scalability and throughput, the TSR also incorporates quality of service features (QOS) that give customers the flexibility to engineer the network to handle multiple types of traffic.

10/19/2017 TCP/IP & Ethernet LAN Page 117 10/19/2017 TCP/IP & Ethernet LAN Page 118 10/19/2017 TCP/IP & Ethernet LAN Page 119 Direct Peer to Peer Quest UUNet Tier 1 OC-48 Tier 1

OC-12 NAP’s Tier 2 T3 ISP_B POP POP POP T3’s Web Hosting Center ILEC CO DSLAM T1 DSL

CP CP Major Long Distance Carriers

• Qwest <- USWest • UUNet <- MCI • Level 3 “Carrier’s carrier” serves others • Cable & Wireless ( old MCI Internet) • GTE / BellAtlantic <- Verizon • Global Crossing / Frontier • AT&T, Sprint • Williams Communications

10/19/2017 TCP/IP & Ethernet LAN Page 121 Source: AMD

1 Trillion Dollar Investment

Over 1.2 billion telephones (including cell) 900,000,000 Local Loops

21 Million Broadband Users 9 Million Cable Modems (mostly in U.S.) 400 Million Internet 12 Million DSL CPEs (World) Users 2001 20 Million DSL CO ports (world)

10/19/2017 TCP/IP & Ethernet LAN Page 122 • DSL Concentration based on ATM Standards • High port density - 672 DSL ports Lucent Stinger • Future-proof busless architecture DSLAM • Layer-2 switched aggregation scheme • Line-to-trunk, trunk-to-trunk and line-to- • line switching • High availability through redundant logic - Hot- swappable modules • Up to 4 OC-3 Trunk ports • Line test and management features • Multiple DSL types supported • Traffic policing, queuing, shaping and congestion control. • Up to 8 VC connections (PVC or SVC) per subscriber • Buffer 150 cells per subscriber • Cell or Frame Relay (subscriber side) • NEBS level-3 compliant • SMNP Management

10/19/2017 TCP/IP & Ethernet LAN Page 124 OSI Reference Model

• Application • Presentation • Session • Transport • Network • Data link • physical

10/19/2017 TCP/IP & Ethernet LAN Page 126