• No results found

Internet Packets. Forwarding Datagrams

N/A
N/A
Protected

Academic year: 2021

Share "Internet Packets. Forwarding Datagrams"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

CMPE 80N - Introduction to Networks and the Internet

Internet Packets

• Packets at the network layer level are called

datagrams

• They are encapsulated in frames for delivery

across physical networks

– “Frames” are packets at the data link layer

• Datagrams are formed by header and payload • Datagrams can have different sizes

– Header is fixed (20 bytes)

– Data area can contain between 1 byte and 65 KB

Forwarding Datagrams

• Header contains all information needed to deliver

datagrams to destination computer

– Destination address – Source address – Identifier

– Other delivery information

• Router examines header of each datagram and

(2)

CMPE 80N - Introduction to Networks and the Internet

Networks and IP addressing

223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 • IP address:

– Network part + Host part

• Network:

– Any host can physically

be reached by any other host without intervening router

– All hosts in the same

network have the same network number

network consisting of 3 IP networks (for IP addresses starting with 223, first 24 bits are network address)

Routing

• Routing means finding a suitable path for a

packet from sender to destination

A possible route

(3)

CMPE 80N - Introduction to Networks and the Internet

Routing (cont’d)

• A router must choose between two or more paths

that lead to the destination.

– Choosing the “shortest” path

• Typically, there are multiple hops to make the

journey

– Unless the hosts are on the same network

• The routing algorithm is the part of a network

layer software responsible for deciding which output line a packet should be transmitted on

Routing Table

• Each router stores information about

forwarding in a routing table

– Initialized at system initialization

– Must be updated as network topology changes

• A routing table contains a list of destination

networks and next hop for each destination

• Note that a router has several IP addresses!

(4)

CMPE 80N - Introduction to Networks and the Internet

Routing Table (cont’d)

• Each table contains information to deliver a packet

to the next hop

• Each table entry has two parts

– First part: Network segment (prefix) of IP address

of the packet destination

• No need for the host segment (suffix)

• Router only delivers across networks; each network

takes care of in-network delivery to host

– Second part: IP address of next router interface

• Specifies where the packet should go

– If one more hop is needed, we write here the IP address of

the next router interface

Example of Routing Table

IP datagram: 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E misc

fields IP addrsource IP addrdest data

datagram remains unchanged, as it travels source to destination

(5)

CMPE 80N - Introduction to Networks and the Internet 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E IP datagram from A, addressed to B:

•look up net. address of B •find B is on same net. as A •link layer will send datagram

directly to B inside link-layer frame

•B and A are directly connected

Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 misc fields 223.1.1.1 223.1.1.3 data

Routing Example 1

223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E Dest. Net. next router Nhops

223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2

IP datagram from A, addressed to E

• look up network address of E •E on different network

•A, E not directly attached •routing table: next hop router to E

is 223.1.1.4

•link layer sends datagram to

(6)

CMPE 80N - Introduction to Networks and the Internet 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E Arriving at 223.1.4, destined for 223.1.2.2

•look up network address of E •E on same network as router’s

interface 223.1.2.9

•router, E directly attached •link layer sends datagram to

223.1.2.2 inside link-layer frame via interface 223.1.2.9

•datagram arrives at 223.1.2.2!!!

(hooray!) misc

fields 223.1.1.1 223.1.2.2 data network router Nhops interface 223.1.1 - 1 223.1.1.4

223.1.2 - 1 223.1.2.9

223.1.3 - 1 223.1.3.27

Dest. next

Routing Example 2 (cont’d)

Internet Protocol (IP)

• IP (Internet Protocol) is the network layer

protocol for the Internet

– It is responsible for datagram routing

• Important: each datagram is routed

independently!

– Two different datagrams in the same connection

can take different routes!

– This can determine different delay for different

(7)

CMPE 80N - Introduction to Networks and the Internet

IP (cont’d)

• IP provides a best effort delivery mechanism

– Does not guarantee to prevent duplicate

datagrams, delayed and out-of-order delivery, corruption of data or datagram loss

• Reliable delivery is provided by the transport

layer, not the network layer (IP)

• Network layer (IP) can detect and report errors

without actually fixing them

Datagram Header Format

Header

(8)

CMPE 80N - Introduction to Networks and the Internet

Address Resolution

• Remember, once a packet is in a network, the IP

address in the packet needs to be translated to a MAC address

– This is called address resolution

• A host or a router uses address resolution only

when it needs to send a packet to another computer (host or router) in the same network

– A computer never resolves the address of a

References

Related documents

We provide asymptotic distributions of those estimators in the HDLSS context where the data dimension is high while the sample size is fixed.. We give a bias corrected CDM estimator

Assuming that router c knows the MAC address of host f and that that entries are present in the switch forwarding tables of vlan 3 for that MAC address, the packet from host d

Software, simply are the computer programs. The instructions given to the computer in the form of a program is called Software. Software is the set of programs, which are used

Figure 5 shows the averaged air distribution effectiveness in the breathing zone for all six spaces studied with standard conditions of supply airflow rate, diffuser number, supply

The levels of resistance to spotted stem borer (Chilo partellus) in sorghum are low to moderate. We therefore evaluated wild relatives of sorghum to identify accessions with high

Host computer Packet The bucket holds packets Unregulated flow Regulated flow Network Interface containing a leaky bucket Water (b) (a). From: Computer Networks, 3 rd

- IP router forwards packet to port 2 to reach Host C (based on IP level routing data using destination IP address of host C) - IP router needs Ethernet address of Host C to send

FIREWALLS LECTURE 8: SECURITY • Packets Filters Internet SECURITY PERIMETER PRIVATE NETWORK Packet- filtering