Top Banner
1 Introduction to Routing and Switching Network Nguyễn Quốc Đính Faculty of IT, Ho Chi Minh City University of Industry Dec 2013
42
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 1

    Introduction to Routing and Switching Network

    Nguyn Quc nh

    Faculty of IT, Ho Chi Minh City University of Industry

    Dec 2013

  • 2

    Part 1

    Introduction

  • 3

    What is this course? Look deeper into switching network Questions

    Where do my packets go? Do they go thru shortest way? What if my routers/switches go down?

    Learn to play around with Cisco routers (and switches) via GNS3

  • 4

    Instructor

    Nguyn Quc nh [email protected]

    My site https://sites.google.com/site/nqdinhddt : Lecture notes, update information. Check it out.

    mailto:[email protected]://sites.google.com/site/nqdinhddt

  • 5

    Course Schedule (lecture)

    1. Introduction (this)2. Router design3. Distance vector routing and RIP4. Link state routing and OSPF5. Border gateway protocol 6. Switching network and Spanning Tree Protocol7. Virtual LAN8. Multicast9. Virtual Circuit

  • 6

    Course Schedule (lab)

    1. Starting with GNS32. Static routing3. RIP(v2, ng)4. OSPF5. VLAN6. VLAN and RIP/OSPF7. MPLS8. Review

  • 7

    News # 1:

    You are not required to go to class big problems (simulation) for teams

    # 2: the lab will go fast

  • 8

    Connecting Devices

  • 9

    Quick Review Layer

    TCP/IP protocol suite

  • 10

    Sort of Connecting Devices

  • 11

    Repeater

    A repeater connects segments of LAN together A repeater has no filtering function. Operate in PHY layer, it forwards every packet

  • 12

    Hub or Multiport-repeater

  • 13

    Bridge/Lan Switch

  • 14

    Bridge/Lan Switch A bridge operates in PHY and Data link layer;

    thus more complex than repeater or hub. A bridge connects segments of LAN together

    Terms: Bridge was coined in the early 1980s Nowadays, term LAN switch is used instead. Ethernet switch is used in the context of Ethernet

  • 15

    Ethernet Hubs vs. Ethernet Switches

    A

    DC

    B A

    DC

    B

    Ethernet hubs Ethernet switches

  • 16

    Router Operate up to layer 3 Interconnect IP network Router edit IP packet it forwards

  • 17

    Router and Bridge An enterprise network (e.g., university network) with a

    large number of local area networks (LANs) can use routers or bridges 1980s: LANs interconnection via bridges Late 1980s and early 1990s: increasingly use of routers Since mid1990s: LAN switches replace most routers

  • 18

    Router vs Bridge

    Routers Each hosts IP address

    must be configured If network is reconfigured,

    IP addresses may need to be reassigned

    Routing done via RIP or OSPF

    Each router manipulates packet header (e.g., reduces TTL field)

    Bridges MAC addresses are

    hardwired No network configuration

    needed No routing protocol

    needed (sort of) learning bridge algorithm spanning tree algorithm

    Bridges do not manipulate frames

  • 19

    Q: What is the major difference between a switch and a router?

    A switch is a physical layer device, whereas a router is a link layer device.

    A switch is more complex than a router. A switch is a link layer device, whereas a router is

    a network layer device. A switch can look at the contents of a packet

    passing through it, while a router can not.

  • 20

    Addresses in Sending Packets

  • 21

    Hey, There are 2 Addresses

    MAC address: 00:20:af:03:98:28

    IP (network) address: 128.143.71.21

    Why two addresses?128.143.71.21

    00:20:af:03:98:28

  • 22

    Why 2 Addresses We wanna keep data link layer and network layer

    independent so that Data link layer could work with other network layer besides

    IP IP could run on any data link layer (Ethernet, FDDI, ATM)

    which may have different addresses We want efficiency.

    Hardware must have an address. Why? Hardware address should not originate from network

    address. Why? Actually, each HTTP message contains 3 addresses

    inside.

  • 23

    DNS: The IP address of neon.tcpip-lab.edu is 128.143.71.21

    ARP: What is the MAC address of 128.143.137.1?

    Send a packet from T to Neon To

    DNS: What is the IP address of neon.tcpip-lab.edu?ARP: The MAC address of

    128.143.137.1 is 00:e0:f9:23:a8:20

    128.143.71.21 is not on my local network.Therefore, I need to send the packet to my

    default gateway with address 128.143.137.1

    frame

    128.143.71.21 is on my local network.Therefore, I can send the packet directly.

    ARP: The MAC address of 128.143.137.1 is 00:20:af:03:98:28

    ARP: What is the MAC address of 128.143.71.21?

    frame

  • 24

    ARP role? Sending to host on the same subnet = direct

    forwarding Does not use a router

    Direct connection between 2 routers Require the knowledge of the MAC address on a LAN

    The ARP and RARP protocols perform the translation between IP addresses and MAC layer addresses

    IP address(32 bit)

    Ethernet MACAddress(48 bit)

    ARP

    RARP

  • 25

    ExampleARP Request from T: Source hardware address: 00:a0:24:71:e4:44 Source protocol address: 128.143.137.144 Target hardware address: 00:00:00:00:00:00 Target protocol address: 128.143.137.1ARP Reply from Router137: Source hardware address: 00:e0:f9:23:a8:20 Source protocol address: 128.143.137.1 Target hardware address: 00:a0:24:71:e4:44 Target protocol address: 128.143.137.144

  • 26

    Test your understanding Q1: What are the MAC and IP addresses at points 1 and 2 for

    packets sent by M1 or M4 to M3 (Mx = mac address) Q2: What must the router do when it receives a packet to M2 for the

    first time?

  • 27

    TCP/IP layers in example

    t.hui.edu.vn128.143.137.144

    router71.hui.edu.vn128.143.137.1

    00:e0:f9:23:a8:20

    router137.hui.edu.vn

    128.143.71.1

    to.hui.edu.vn128.143.71.21

  • 28

    t.hui.edu.vn128.143.137.144

    router71.hui.edu.vn128.143.137.1

    00:e0:f9:23:a8:20

    router137.hui.edu.vn

    128.143.71.1

    to.hui.edu.vn128.143.71.21

    TCP/IP layers in example

    Send HTTP Request to To

    Establish a connection to 128.143.71.21 at port 80 Open TCP connection to

    128.143.71.21 port 80

    Send a datagram (which contains a connection request) to 128.143.71.21Send IP datagram to

    128.143.71.21

    Send the datagram to 128.143.137.1

    Send Ethernet frame to 00:e0:f9:23:a8:20

    Send Ethernet frame to 00:20:af:03:98:28

    Send IP data-gram to 128.143.71.21

    Send the datagram to 128.143.7.21

    Frame is an IP datagram

    Frame is an IP datagram

    IP datagram is a TCP segment for port 80

  • 29

    IP addresses You know it already: x.x.x.x Theoretically, up to 232 4 billion hosts Practically, about 768 millions (Jul 2010, ISC

    Survey), still huge!

    Routing table with 768M entries? No no.

  • 30

    Hierarchical Addressing The network prefix identifies a network and the host

    number identifies a specific host (actually, interface on the network).

    How do we know how long the network prefix is? Before 1993: The network prefix is implicitly defined After 1993: The network prefix is indicated by a

    netmask.

    network prefixnetwork prefix host numberhost number

  • 31

    Hierarchical Addressing Each network assigned a prefix Foreign routers routing tables only need an entry for

    the entire network The entry points to the networks gateway(s)

  • 32

    Scalability Improved Routing tables are smaller (but still too big) No need to update the routers when new host added

    E.g., adding a new host 5.6.7.213 on the right Doesnt require adding a new forwarding-table entry

  • 33

    Classful IP addresses old guy network prefix = Netid host number = Hostid

  • 34

    CIDRClassless Inter-Domain Routing

    Abandons the notion of classes

    Key Concept: The length of the network prefix in the IP addresses is kept arbitrary

    Consequence: Size of the network prefix must be provided with an IP address

  • 35

    CIDR notations CIDR notation of the address 220.231.93.18/24

    24 is the prefix length; the 24 first bits are network prefix of the address

    leaving (32 24) bits for specific host addresses. Total host may available is 256 (Where does this number come from?)

    CIDR notation can replace the use of netmasks 220.231.93.18/24 means IP address 220.231.93.18 with

    netmask 255.255.255.0

  • 36

    Scalability Improved Routing tables are smaller (but still too big) No need to update the routers when new host added

    E.g., adding a new host 5.6.7.213 on the right Doesnt require adding a new forwarding-table entry

  • 37

    Example #1 Assume that an ISP owns the address block

    206.0.64.0/18, which represents 16,384 (214) IP addresses

    Suppose a client requires 800 host addresses With classful addresses: need to assign as class B

    address (and waste ~64,700 addresses) or four individual Class Cs (and introducing 4 new routes into the global Internet routing tables)

    With CIDR: Assign a /22 block, e.g., 206.0.68.0/22, and allocated a block of 1,024 (210) IP addresses.

  • 38

    Example #2 An organization is granted the block

    130.34.12.64/26. The organization needs to have four subnets. What are the subnet addresses and the range of addresses for each subnet?

  • 39

    Example #2 The suffix length is 6. This means the total number of

    addresses in the block is 64 (26). If we create four subnets, each subnet will have 16 addresses. Subnet 1: 130.34.12.64/28 to 130.34.12.79/28. Subnet 2 : 130.34.12.80/28 to 130.34.12.95/28. Subnet 3: 130.34.12.96/28 to 130.34.12.111/28. Subnet 4: 130.34.12.112/28 to 130.34.12.127/28.

  • 40

    Example #2

  • 41

    CIDR: Reduce Routing Table Sizes About 350K entries to date

  • 42

    Next lecture: Router design

    Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Ethernet Hubs vs. Ethernet SwitchesSlide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34Slide 35Slide 36Slide 37Slide 38Slide 39Slide 40Slide 41Slide 42