Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de...

45
Introduction to network architecture 1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted by: Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.

Transcript of Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de...

Page 1: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

Introduction to network architecture 1

Chapter 1Introduction to network architecture

Departamento deTecnología Electrónica

Some of these slides are copyrighted by:

Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith RossAddison-Wesley, April 2009.

Page 2: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

2

Chapter 1: Introduction to network architecture Chapter goals:

Remembering networking basic concepts that are key for the subject.

o OSI Model and TCP/IP architectureo Transport layer conceptso Network layer conceptso Data link layer concepts

Introducing Virtual Local Area Networks (VLAN)

Introduction to network architecture

Page 3: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

3

Chapter 1: Introduction to network architecture 1.1 OSI Model. TCP/IP

Architecture 1.2. Transport layer 1.3. Network layer

1.4. Data link layer 1.5 Virtual Local Area

Network, VLANs

Introduction to network architecture

Page 4: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

4Introduction to network architecture

Chapter 1: Introduction to network architecture 1.1 OSI Model. TCP/IP

Architecture 1.2. Transport layer 1.3. Network layer

1.4. Data link layer 1.5 Virtual Local Area

Network, VLANs

Page 5: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

5

TCP/IP Architecture

application

transport

network

data link

physical

A_PDUmessage

T_PDUsegment

R_PDUDatagram/

packet

E_PDUframe

Introduction to network architecture

application: supporting network applications FTP, SMTP, HTTP

transport: process-process data transfer TCP, UDP

network: addressing and routing of datagrams from source to destination IP, routing protocols

data link: data transfer between neighboring network elements PPP, Ethernet

physical: bits “on the wire”

Page 6: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

OSI Model

6Introduction to network architecture

presentation: allow applications to interpret meaning of data, e.g., encryption, compression, machine-specific conventions

session: synchronization, checkpointing, recovery of data exchange

Internet stack “missing” these layers! these services, if needed, must

be implemented in application

application

presentation

session

transport

network

link

physical

Page 7: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

(N+1)-PDU

(N)-DU (N)-PDU

(N)-SDU

(N)-PCI

Level N

Level N+1

En

cap

su

latio

n

TransmitterTransmitter

7

Encapsulation

Simplified encapsulation model

Introduction to network architecture

Page 8: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

8

Decapsulation

(N+1)-PDU

(N)-DU (N)-PDU

(N)-SDU

(N)-PCI

Level N

Level N+1

Decap

su

latio

n

ReceiverReceiver

Introduction to network architecture

Page 9: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

Example of layer architecture: Internet

Sourceapplicationtransportnetworkdata linkphysical

HtHn M

segment Ht

datagram

Destination

applicationtransportnetworkdata linkphysical

HtHrHe M

HtHr M

Ht M

M

networkdata linkphysical

router

message M

Ht M

Hrframe

HtHrHe M

HtHr M

HtHrHe M

Example: Two hosts connected by a router.

Nota

Phy medium

Hx = X_PCIM = A_PCI(Ha) + User data (UD)Example UD:e_mail subject/bodyText of a WhatsApp message

9Introduction to network architecture

Page 10: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

Multiplexion

10

How do we identify the client protocol? TCP & UDP: Port field. IP: Protocol field Ethernet: Ethertype field (Type/length) IEEE 802.3 (MAC) uses LLC (IEEE 802.2) IEEE 802.2: DSAP y SSAPSNAP may be used together with IEEE 802.2 to identify with Ethertype

Introduction to network architecture

more than one transport protocol available to apps Internet: TCP and UDP

FTP HTTP SMTP DNS TFTP

TCP UDP

IP

Link layer (LLC & MAC)

Physical Layer

Application

Transport

Network

Page 11: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

Multiplexion. Example (I)

11Introduction to network architecture

Page 12: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

Multiplexion. Example (II)

12

Data link

Message

DataH C

Introduction to network architecture

Page 13: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

Multiplexion. Example (III)

13

Data link

Network

Message

DataH E

DataH

Introduction to network architecture

Page 14: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

Multiplexion. Example (IV)

14

Data link

Network

DataH

Transport

DataH

Introduction to network architecture

Page 15: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

15Introduction to network architecture

Chapter 1: Introduction to network architecture 1.1 OSI Model. TCP/IP

Architecture 1.2. Transport layer 1.3. Network layer

1.4. Data link layer 1.5 Virtual Local Area

Network, VLANs

Page 16: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

16Introduction to network architecture

Transport services and protocols

provide logical communication between app processes running on different hosts

transport protocols run in end systems breaks app messages into segments, passes to

network layer

NetworkHost A Host B

Page 17: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

17Introduction to network architecture

Internet transport-layer protocols more than one

transport protocol available to apps Internet: TCP

and UDP

TCP UDP

Connection- oriented

Non-connection- oriented

Reliable Unreliable

Segment grouping Unfragmented messages

Rcv orders segments

User datagram

ACKs and timers No ACKs

Flow control No flow control

Congestion control No congestion control

Page 18: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

18Introduction to network architecture

Internet transport-layer protocols Port: identifies application Port numbers:

http://www.iana.org/assignments/port-numbers

Application protocol

Port numbers Transport protocol

FTP 20, 21 TCP

Telnet 23 TCP

SMTP 25 TCP

DNS 53 UDP (TCP (*))

TFTP 69 UDP

HTTP 80 TCP

POP3 110 TCP

RIP 520 UDP

Page 19: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

UDP_PDU32 bits

length checksum

Header (T_PCI) has only 4 fields. Lenght is in bytes

and deals with the whole T_PDU,

including the header.

Source port Dest port

App level data(message)

UDP T_PDU format

T_PCI

T_UD

Introduction to network architecture 19

Page 20: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

20

socketdoor

T C Psend buffer

T C Preceive buffer

socketdoor

segm ent

applicationwrites data

applicationreads data

Introduction to network architecture

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581

full duplex data: bi-directional data flow

in same connection MSS: maximum

segment size

connection-oriented: handshaking (exchange

of control msgs) init’s sender, receiver state before data exchange

flow controlled: sender will not

overwhelm receiver

point-to-point: one sender, one

receiver

reliable, in-order byte stream: no “message

boundaries”

pipelined: TCP congestion and flow

control set window size

send & receive buffers

Page 21: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

21Introduction to network architecture

TCP segment structure

source port # dest port #

32 bits

applicationdata

(variable length)

sequence number

acknowledgement numberReceive window

Urg data pnterchecksum

FSRPAUheadlen

notused

Options (variable length)

URG: urgent data (generally not used)

ACK: ACK #valid

PSH: push data now(generally not used)

RST, SYN, FIN:connection estab(setup, teardown

commands)

# bytes rcvr willingto accept

countingby bytes of data(not segments!)

Internetchecksum

(as in UDP)

Page 22: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

22Introduction to network architecture

TCP seq. #’s and ACKsHost A Host B

Seq=M, SYN=1

Seq=N, ACK=M+1, SYN=1

Seq=M+1, ACK=N+1

Client starts active open

Client confirms

server open

Server is in passive open, starts connection

and confirms client open

timeConnection established

Page 23: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

23Introduction to network architecture

Chapter 1: Introduction to network architecture 1.1 OSI Model. TCP/IP

Architecture 1.2. Transport layer 1.3. Network layer

1.4. Data link layer 1.5 Virtual Local Area

Network, VLANs

Page 24: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

24

Network layerNetwork layer functions:

•Packet routing•Logical addressing•Multiplexion•Packet segmentation (fragmentation)

Introduction to network architecture

Which route?

Adressing: Network & HostNetwork Host

-Network address: Used by the router

-Host address: used by a determined host

Page 25: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

25

IPv4 protocol

Most used network layer protocol

32-bit address Network part Host part

Network and host parts are determined by the subnet mask. First x bits are set to 1

and define the number of bits of the network part.

Last 32-x bits are set to 0 and define the number of bits of the host part

Introduction to network architecture

Network Host

IP addressing

Page 26: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

IPv4 special addresses

Addresses Meaning Use

0.0.0.0/32The own host inside the own

networkAs source address if a host does not know

its IP address

10.0.0.0/8172.16.0.0/12

192.168.0.0/16Private addresses

IP connectivity, but no access to the Internet

127.0.0.0/8 Loopback intefaceIp use without access to the physical

medium.

169.254.0.0/16 AutoconfigurationA host does not have an IP address,

neither manually nor by means of a DHCP server

224.0.0.0/4 Multicast IP Multicast (D class)

240.0.0.0/4 Reserved For the use of IANA (E class)

255.255.255.255 Limited broadcast Broadcast destination for the network

26Introduction to network architecture

Page 27: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

27

IP_PDU format (datagram/packet)

Introduction to network architecture

ver length

32 bits

data (variable length,typically a TCP

or UDP segment)

16-bit identifier

header checksum

time tolive

32 bit source IP address

IP protocol versionnumber

header length (bytes)

max numberremaining hops

(decremented at each router)

forfragmentation/reassembly

total datagramlength (bytes)

upper layer protocolto deliver payload to

head.len

type ofservice

“type” of data flgsfragment

offsetupper layer

32 bit destination IP address

Options (if any) E.g. timestamp,record routetaken, specifylist of routers to visit.

how much overhead with TCP?

20 bytes of TCP 20 bytes of IP = 40 bytes + app

layer overhead

Page 28: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

Routing table (host)

Host IP addr? Subnet mask? Network Id.? MAC address? Default gateway? Gateway for 10.10.63.20? Gateway for 150.214.141.120? MAC for 10.10.63.255?

28Introduction to network architecture

Page 29: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

Routing table (router)

NETWORK 2

NETWORK 2

Router 1192.1.1.2

192.1.2.1

192.1.2.2

192.1.1.1

192.1.1.3

192.1.2.3 192.1.2.63

…192.1.1.31

E0 E1

NETWORK 1NETWORK 1

NETWORK 3

NETWORK 3

192.1.3.2 192.1.3.127

192.1.3.1

Router 2

E2

E0 E1

192.1.4.2

192.1.4.1

When receiving a packet, the router makes the AND operation between IP dest addr and the different subnet masks in the routing table. Finally, it sends the packet for the interface pointed out by the routing table.

29

RT Router 1

Network Subnet mask Next hop Interface

192.1.1.0 255.255.255.224 - E0

192.1.2.0 255.255.255.192 192.1.4.1 E1

192.1.3.0 255.255.255.128 - E2

192.1.4.0 255.255.255.0 - E1

RT Router 2

Network Subnet mask Next hop Interface

192.1.1.0 255.255.255.224 192.1.4.2 E0

192.1.2.0 255.255.255.192 - E1

192.1.3.0 255.255.255.128 192.1.4.2 E0

192.1.4.0 255.255.255.0 - E0

Introduction to network architecture

Page 30: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

Difference between logical addresses (IP) and physical addresses (MAC)

Router142.128.1.1 150.214.141.1

Source IP addr

Host A142.128.1.11

00:1C:27:56:34:AA

Host Y150.214.141.19

00:1C:27:18:00:01

IP packet

Source MAC addrDest IP addr Dest MAC addr

IP packet

12:34:56:78:90:AB

142.128.1.11 150.214.141.19 00:1C:27:56:34:AA 12:34:56:78:90:AB

Source IP addr Source MAC addrDest IP addr Dest MAC addr

142.128.1.11 150.214.141.19 12:34:56:78:90:AB 00:1C:27:18:00:01

30Introduction to network architecture

Page 31: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

Socket

A process sends/recieves messages by/from its socket

A socket is identified by: IP address. Port number.

Port number examples:

HTTP: port 80 DNS: port 53

31Introduction to network architecture

Page 32: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

32Introduction to network architecture

Chapter 1: Introduction to network architecture 1.1 OSI Model. TCP/IP

Architecture 1.2. Transport layer 1.3. Network layer

1.4. Data link layer 1.5 Virtual Local Area

Network, VLANs

Page 33: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

LAN (Local Area Network) Local Area Networks are the most used network

technology. They allow the connection between hosts and routers

inside a broadcast domain. Most used LAN standards are:

802.3, Ethernet. 802.11, WI-FI (WLAN, Wireless LAN).

Data link layer is divided into two sublevels: o LLC (Link Layer Control). Its functions are flow control and error correction.o MAC (Medium Access Control). Foer frame synchronism, error detection, medium access control, and physical addressing.

Implmented in NIC (Network Interface Card) up to MAC sublevel.

OSI LAN

Data link LLC

MAC

Physical

33Introduction to network architecture

Page 34: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

MAC addresses Size -> 48 bits.

Example: 1B:03:F2:45:78:25

There are three types of MAC addresses: Unicast: To send DL_PDUs to an only destination.

All the network interfaces have a default factory MAC address. Broadcast: As a destination, it is used to send DL_PDUs to ALL

the hosts in a broadcast domain (FF:FF:FF:FF:FF:FF). Multicast: As a destination, it is used to send DL_PDUs to SOME

of the hosts in a broadcast domain . Configurable. The least significant bit in the first byte of the MAC

address is set to 1. IEEE manages unicast factory MAC addresses.

Every manufacturer has a range of MAC addresses (to assure MAC addresses are unique)

It is possible to change them.

34Introduction to network architecture

Page 35: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

35

Standards

LAN/MAN standards

Introduction to network architecture

Page 36: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

MAC_PDU (frame)

Preamble (8 bytes)

Dest MAC address(6 bytes)

Source MAC address(6 bytes)

Length/Type(2 bytes)

MAC_UD(46-1500 bytes)

Trailer

CRC(4 bytes)

1 byte7 bytes with 10101010.1 byte (the last one) con 10101011.

MTU for Ethernet is 1500 bytesNote

•<=1500 meaning length:

- number of bytes for MAC_UD- Sublevel LLC is present.

•>=1536 meaning type:

Multiplexion and demultiplexion

Data corresponding to the upper layer, generally IP, ARP o rLLC.If MAC_UD size is below 46 bytes, there is a trailer of bytes set to 0.

36Introduction to network architecture

Page 37: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

37Introduction to network architecture

Chapter 1: Introduction to network architecture 1.1 OSI Model. TCP/IP

Architecture 1.2. Transport layer 1.3. Network layer

1.4. Data link layer 1.5 Virtual Local Area

Network, VLANs

Page 38: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

VLAN

38Introduction to network architecture

Introduction: Hierarchic topology for institutional modern LANs Every working gruup has its own switched LAN Switched LANs may be interconnected by a

hierarchy of switches.

A

B

S1

C D

E

FS2

S4

S3

H

I

G

Page 39: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

VLAN

Disadvantages: Traffic is not isolated

Broadcast traffic Traffic must be limited for security and confidentiality

reasons

Inefficient use of switches User management

39Introduction to network architecture

Page 40: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

VLAN

VLAN: Port-based VLAN

Switch ports are divided into groups Every group constitutes a VLAN Every VLAN is a broadcast domain User management -> Change in switch configuration

A B C D E F G H I 40Introduction to network architecture

Page 41: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

VLAN

VLAN: How is information between groups sent?

Connect switch port to an external router Configure that port as a member of both groups Logical configuration -> Separate switches connected by a

router Habitually, manufacturers include VLAN and router in an only

device

A B C D E F G H I 41Introduction to network architecture

Page 42: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

VLAN

VLAN: Different location

Members of the same group in different buildings Several switches needed Connecting group ports between switches -> Non scalable

A BC

D E FG HI 42Introduction to network architecture

Page 43: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

VLAN

VLAN: Different location

VLAN Trunking Trunk port belongs to all VLANs Destination VLAN? 802.1Q frame format

A BC

D E FG HI

Trunk link

43Introduction to network architecture

Page 44: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

VLAN

IEEE 802.1Q: IEEE 802.3 (Ethernet)

IEEE 802.1Q

Dest addr

DataPreambleSourceaddr

Type CRC

Destaddr

DataPreambleSource

addr

TypeNewCRC

TPID TCI

Tag Control Information

Tag Protocol Identifier

44Introduction to network architecture

Page 45: Introduction to network architecture1 Chapter 1 Introduction to network architecture Departamento de Tecnología Electrónica Some of these slides are copyrighted.

VLAN

VLAN: MAC-based VLAN

The network administrator creates VLAN groups based on MAC address ranges.

Switch port is connected to the VLAN that corresponds to the associated host’s MAC address.

IP-based VLAN Based on IPv4 or IPv6 addresses Based on network protocols (Appletalk, IPX, TCP/IP)

45Introduction to network architecture