Networking 1
Mobile Communications Fundamental Networking
Manuel P. Ricardo
Faculdade de Engenharia da Universidade do Porto
Mobile Communications Fundamental Networking Manuel P. Ricardo - - PowerPoint PPT Presentation
Networking 1 Mobile Communications Fundamental Networking Manuel P. Ricardo Faculdade de Engenharia da Universidade do Porto Networking 2 What networking concepts shall I have present from previous courses? What are the differences
Networking 1
Faculdade de Engenharia da Universidade do Porto
Networking 2
♦ What networking concepts shall I have present from previous courses? ♦ What are the differences between L2 and L3 networks? ♦ What is a tunnel? What is a virtual network? Why are they relevant? ♦ What are the differences between IPv6 and IPv4?
Networking 3
Networking 4
♦
Technologies: ISDN: Basic Rate Access, E1 time slots for 64 kbit/s channels
♦
Path defined during call establishment, based on the called number
♦
Switching
» Exchange of time slots » In time and in space » Inputs required to be synchronised
Networking 5
♦ Technologies: ATM, MPLS ♦ Path
» defined during the virtual circuit establishment » Defined as a set of nodes, ports, labels
♦ Switching
» Cells, packets » Exchange of labels
Tabela de translação de portas / canais virtuais 1 M a t 1 N 2 t Entrada M a b c y z c 1 N 2 2 1 N k h m n n g Saída 1
Porta CV Porta CV
comutação espacial comutação de etiqueta b c c y c z y controlo de comutação g h n k k n m g cabeçalho dados a, b, c, ... indicador de canal virtual
b
a
Networking 6
♦ Technologies: Ethernet, IP ♦ Path defined by packet destination address
Networking 7
♦ Suppose terminal a moves from port 2 to port 1
» What needs to be done so that terminal a can continue receiving packets?
Networking 8
Ethernet PPP
7x 10101010 10101011 Bit stuffing – 5 1s seguidos emissor introduz 0 Protocolo=IP
Networking 9
♦ Bridge builds forwarding tables automatically ♦ Address learning
» Source Address of received frame is associated to a bridge input port
station reachable through that port
♦ Frame forwarding
» When a frame is received, its Destination Address is analysed
– If address is associated to a port frame forwarded to that port – If not frame transmitted through all the ports but the input port
Networking 10
– No hop-count – Could loop forever – Same for broadcast packet
– Required to have tree topology – Single path between every pair of stations
– Running in bridges – Helps building the spanning tree – Blocks ports
L2 Networking - Single Tree Required
Networking 11
» its own LAN segment » its LAN segment bridged to all the other segments
Networking 12
♦ One bridge simulates multiple LANs / broadcast domains ♦ One LAN may be extended to other bridges
w y VLAN 100 VLAN 200 B1 x z VLAN 100 VLAN 200 B2 [da=w; sa=x; data] [da=w; sa=x; vlanid=100; data] [da=w; sa=x; data]
Networking 13
Version HLen TOS Length Ident Flags Offset TTL Protocol Checksum SourceAddr DestinationAddr Options (variable) Pad (variable) 4 8 16 19 31 Data Version
Traffic Class
Flow Label Payload Lengtht Next Header Hop Limit SourceAddr (4 words) DestinationAddr (4 words) Options (variable number) 4 8 16 24 31 Data
Networking 14
3ª generation router
Networking 15
♦ Every router
» finds the shortest path to the other routers and their attached networks » Calculates its Shortest Path Tree (SPT)
♦ Routing protocol
» Run in routers » Helps routers build their SPT » RIP, OSPF, BGP
Destination Cost NextHop A 1 A C 1 C D 2 C E 2 A F 2 A G 3 A
D G A F E B C
Networking 16
♦ Point to connection between a client and a server; port-to-port ♦ Reliable, flow control ♦ Congestion control
Sender Data (SequenceNum) Acknowledgment + AdvertisedWindow Receiver
Networking 17
Applications Elastic Intolerant Real time Tolerant Nonadaptive Adaptive Delay adaptive Rate adaptive
(variation of the packet end-to-end delay) (packet loss) (application reaction to packet loss) (type of reaction)
Networking 18
♦ Multimedia traffic ♦ Application-Level Framing ♦ Data Packets (RTP)
» sequence number » timestamp (app defines “tick”) » transported as UDP packets
♦ Control Packets (RTCP)
» sent periodically » report loss rate (fraction of packets received since last report) » report measured jitter
Networking 19
T1 IP TCP APP T1 | T2 T2 | T3 IP T3 | T4 IP T5 IP TCP APP
host bridge router router host
T4 | T5
bridge IEEE MAC address based switching IETF IP address based switching
Networking 20
T1 IP TCP APP T1 | T2 T2 | T3 IP T3 | T4 T5 IP TCP APP
H1 bridge R1 R2 Server
T4 | T5
bridge
IP IP IP
data
DA= red IP address of R2 SA= red IP address of H1 TTL IP identification IP-in-IP IP checksum flags fragment offset length TOS ver. IHL DA= Server SA=H1 TTL IP identification
IP checksum flags fragment offset length TOS ver. IHL TCP/UDP/ ... payload
Networking 21
» GRE
– virtual point-to-point link – routers at remote points – over an IP network
» PPP adequate for
– Authentication – Transporting IP packets
T1 IP TCP APP T1 | T2 T2 | T3 IP T3 | T4 T5 IP TCP APP
H1 bridge R1 R2 Server
T4 | T5
bridge
IP IP IP PPP GRE GRE PPP
Networking 22
Networking 23
Networking 24
♦ IPv4
– Small addressing space (32 bits) – Non-continuous usage – Some solutions used to overcome these problems private networks (NAT), classless networks (CDIR)
♦ IETF developed new IP version: IPv6
– Same principles of IPv4 – Many improvements – Header re-defined
♦ IPv6 may be relevant for mobile communications
Networking 25
» 128 bit addresses (16 octets, 8 shorts ). No classes » Better QoS support (flow label) » Native security functions (peer authentication, data encryption) » Autoconfiguration (Plug-n-play) » Routing » Multicast
Networking 26
♦ 8 x 16 bit, hexadecimal. Separated by : 47CD : 1234 : 3200 : 0000 : 0000 : 4325 : B792 : 0428 ♦ Compressed format: FF01:0:0:0:0:0:0:43 FF01::43 ♦ Compatibility with IPv4: 0:0:0:0:0:0:13.1.68.3 or ::13.1.68.3 ♦ Loopback address: ::1 ♦ Network prefix described by / , same as IPv4 » FEDC:BA98:7600::/40 network prefix = 40 bits
Networking 27
Allocation Prefix Fraction of (binary) Address Space
0000 0000 1/256 Unassigned 0000 0001 1/256 Reserved for NSAP Allocation 0000 001 1/128 Unassigned 0000 01 1/64 Unassigned 0000 1 1/32 Unassigned 0001 1/16 Global Unicast 001 1/8 Unassigned 010 1/8 Unassigned 011 1/8 Unassigned 100 1/8 Unassigned 101 1/8 Unassigned 110 1/8 Unassigned 1110 1/16 Unassigned 1111 0 1/32 Unassigned 1111 10 1/64 Unassigned 1111 110 1/128 Unassigned 1111 1110 0 1/512 Link-Local Unicast Addresses 1111 1110 10 1/1024 Site-Local Unicast Addresses 1111 1110 11 1/1024 Multicast Addresses 1111 1111 1/256
Networking 28
» Link-Local
– Used for communication between hosts in the same LAN /link – Address built from MAC address – Routers do not foward packets having Link-Local destination addresses
» Site-Local
– Not used anymore
» Global Unicast
– Global addresses – Address: network prefix + computer identifier – Structured prefixes Network aggregation; less entries in the forwarding tables
» Anycast
– Group address; packet is received by any (only one) member of the group
» Multicast
– Group address; packet received by all the members of the group
Networking 29
| n bits | m bits | 128-n-m bits | Global Unicast Address +------------------------+-----------+----------------------------+ (2000::/3) |001 global rout prefix | subnet ID | interface ID | +------------------------+-----------+----------------------------+ | 10 | | bits | 54 bits | 64 bits | Link-Local Unicast address +----------+-------------------------+----------------------------+ (fe80::/10) |1111111010| 0 | interface ID | +----------+-------------------------+----------------------------+ | 10 | | bits | 54 bits | 64 bits | Site-Local Unicast address +----------+-------------------------+----------------------------+ (fec0::/10) |1111111011| subnet ID | interface ID | +----------+-------------------------+----------------------------+ | n bits | 128-n bits | Anycast address +------------------------------------------------+----------------+ | subnet prefix | 00000000000000 | +------------------------------------------------+----------------+ | 8 | 4 | 4 | 112 bits | +------ -+----+----+---------------------------------------------+ |11111111|flgs|scop| group ID | +--------+----+----+---------------------------------------------+
Multicast address Scope – link, site, global, ... (ff::/8)
Networking 30
Version HLen TOS Length Ident Flags Offset TTL Protocol Checksum SourceAddr DestinationAddr Options (variable) Pad (variable) 4 8 16 19 31 Data Version
Traffic Class
Flow Label Payload Lengtht Next Header Hop Limit SourceAddr (4 words) DestinationAddr (4 words) Options (variable number) 4 8 16 24 31 Data
Networking 31
♦ Flow label identifies packet flow
» QoS, resource reservation » Packets receive same service
♦ Payload length
» Header not included
♦ Hop limit = TTL (v4) ♦ Next header
» Identifies next header/extension
♦ Options included as extension headers
Version
Traffic Class
Flow Label Payload Lengtht Next Header Hop Limit SourceAddr (4 words) DestinationAddr (4 words) Options (variable number) 4 8 16 24 31 Data
Networking 32
IPv6 Header
Next Header = TCP
TCP header + data Routing Header
Next Header = TCP TCP header + data
IPv6 Header
Next Header = Routing
IPv6 Header
Next Header = Routing
Routing Header
Next Header = Fragment
Fragment Header
Next Header = TCP
Fragment of TCP header + data IPv6 Hop-by-hop TCP Destination Routing Fragment Authenticate. ESP
Networking 33
» Hop-by-hop
additional information, inspected by every node traversed by the packet Other header are inspected only at the destination or at pre-defined nodes
» Destination:
Information for the destination node
» Routing:
List of nodes to be visited by the packet
» Fragmentation:
Made by the source; it shall find MPU
» Authentication:
Authentication (signature) of packet header
» ESP:
Data encryption
Networking 34
As the packet travels from S to I1: Source Address = S Hdr Ext Len = 6 Destination Address = I1 Segments Left = 3 Address[1] = I2 Address[2] = I3 Address[3] = D As the packet travels from I1 to I2: Source Address = S Hdr Ext Len = 6 Destination Address = I2 Segments Left = 2 Address[1] = I1 Address[2] = I3 Address[3] = D As the packet travels from I2 to I3: Source Address = S Hdr Ext Len = 6 Destination Address = I3 Segments Left = 1 Address[1] = I1 Address[2] = I2 Address[3] = D As the packet travels from I3 to D: Source Address = S Hdr Ext Len = 6 Destination Address = D Segments Left = 0 Address[1] = I1 Address[2] = I2 Address[3] = I3
List of visited nodes
Networking 35
quadro porta banc_3 banc_6 pc3---[HUB]---pc2----+ +----pc2---[HUB]---pc3 2000:0:0:3::/64 | | 2000:0:0:6::/64 | | banc_2 | | banc_5 pc3---[HUB]---pc2--[HUB]-+ +-[HUB]--pc2---[HUB]---pc3 2000:0:0:2::/64 | | | | 2000:0:0:5::/64 | | | | banc_1 | | | | banc_4 pc3---[HUB]---pc2----+ | | +----pc2---[HUB]---pc3 2000:0:0:1::/64 | | 2000:0:0:4::/64 | | 2000:0:0:e::/64| |2000:0:0:d::/64 | | [routerv6] 2000:0:0:1::1 2000:0:0:1::aa 2000:0:0:e::1
Networking 36
tux13:~# /sbin/ifconfig eth0 inet6 add 2000:0:0:1::1/64 tux13:~# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:C0:DF:08:D5:99 inet addr:172.16.1.13 Bcast:172.16.1.255 Mask:255.255.255.0 inet6 addr: 2000:0:0:1::1/64 Scope:Global inet6 addr: fe80::2c0:dfff:fe08:d599/10 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:81403 errors:0 dropped:0 overruns:0 frame:0 TX packets:2429 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:4981344 (4.7 MiB) TX bytes:260692 (254.5 KiB) Interrupt:5 tux13:~# /sbin/route -A inet6 add 2000::/3 gw 2000:0:0:1::aa tux13:~# route -A inet6 Kernel IPv6 routing table Destination NextHop Flags Metric Ref Use Iface ::1/128 :: U 0 0 0 lo 2000:0:0:1::1/128 :: U 0 0 0 lo 2000:0:0:1::/64 :: UA 256 0 0 eth0 2000::/3 2000:0:0:1::aa UG 1 0 0 eth0 fe80::2c0:dfff:fe08:d599/128 :: U 0 0 0 lo fe80::/10 :: UA 256 0 0 eth0 ff00::/8 :: UA 256 0 0 eth0 ::/0 :: UDA 256 0 0 eth0
Networking 37
Method to create a IEEE EUI-64 identifier from an IEEE 48bit MAC identifier. This is to insert two octets, with hexadecimal values of 0xFF and 0xFE, in the middle of the 48 bit MAC (between the company_id and vendor supplied id). For example, the 48 bit IEEE MAC with global scope: |0 1|1 3|3 4| |0 5|6 1|2 7| +----------------+----------------+----------------+ |cccccc0gcccccccc|ccccccccmmmmmmmm|mmmmmmmmmmmmmmmm| +----------------+----------------+----------------+ 00:C0:DF:08:D5:99 where "c" are the bits of the assigned company_id, "0" is the value of the universal/local bit to indicate global scope, "g" is individual/group bit, and "m" are the bits of the manufacturer-selected extension identifier. The interface identifier would be of the form: |0 1|1 3|3 4|4 6| |0 5|6 1|2 7|8 3| +----------------+----------------+----------------+----------------+ |cccccc1gcccccccc|cccccccc11111111|11111110mmmmmmmm|mmmmmmmmmmmmmmmm| +----------------+----------------+----------------+----------------+ fe80::2c0:dfff:fe08:d599
Networking 38
♦ What is the ARP? How does it work?
Networking 39
Networking 40
♦ IPv6 node uses ND for
» Find other nodes in the same link /LAN » Find a node MAC address
ND substitutes ARP
» Find router(s) in its network » Mantaining information about neighbour nodes
♦ ND similar to the IPv4 functions
» ARP IPv4 » ICMP Router Discovery » ICMP Redirect
Networking 41
» ICMP messages (over IP); using Link Local addresses » Neighbor Solicitation
Sent by a host to obtain MAC address of a neighbour / to verify its presence
» Neighbor Advertisement: Answer to the request » Router Advertisement
Information about the network prefix; periodic or under request Sent by router to IP address Link Local multicast
» Router Solicitation: host solicits from router a Router Advertisment message » Redirect: Used by a router to inform an host about the best route to a destination
Networking 42
Networking 43