ip training programmeip classes class purpose first byte between subnet mask prefix max hosts a...

Post on 10-Mar-2020

15 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

IP Training Programme

Module 1: IP Generic

Session 3: IP Services

Subjects

• Review

• The IP Address continued…

• Routing protocols (Concept)

• Firewalll and NAT

• DNS server and DNS operation concept

• DHCP server including options

• Network security in general

SMALL REVIEW FROM

SESSION 1 AND 2

Just the important stuff

IP Classes

Class Purpose First byte between Subnet mask Prefix Max hosts

A Unicast 0 and 127 255.0.0.0 /8 16.777.214

B Unicast 128 and 191 255.255.0.0 /16 65.534

C Unicast 192 and 223 255.255.255.0 /24 254

Class Purpose First byte between Subnet mask Prefix Max hosts

D Multicast 224 and 239 None special None -

E Reserved 239 and 255 None None -

Additional classes

Between logical net

61.14

WAN link

Net: 194.182.53/24

10 11 12 13

1

Net: 182.114/16

61.13

1.1

67.19 112.4

Router

Router

TCP/IP vs. ISO

• TCP/IP was developed with four layers.

TCP in IP in Ethernet

Type

Contains the value 800 showing

the Ethernet frame contains an

IP packet

Destination

MAC address

6 Byte

Source

MAC Address

6 Byte 2 Byte

IP packetFrame Check

(Checksum CRC)

Source

IP Address

32 bit

Destination

IP Address

32 bit

IP packet

(Simplified)

Ethernet frame

Containing IP Packet

Ethernet data

46 Byte to 1500 Bytes

Data in IP packet. Variable size

TCP PacketProtocol

Contains the value 6 indicating

the IP packet contains a TCP

packet

Sequence

number

Data in TCP packet. Variable sizeTCP packet

(Simplified)

Destination

Port

Source

port

Session layer related information

TCP Data

Session layer part of TCP

(Simplified)

TCP and UDP

• TCP builds virtual connections between end points. (hosts) • Connection oriented protocol – Create, maintain and close• Reliable transport.• The transmitter splits data segments. (Ethernet maximum 1500 bytes data)• The receiver assemble the data segments.• The receiver acknowledges the reception of segments. Lost segments are

retransmitted.

• UDP transports data between end points. (hosts)• Connection less. Just send data and hoping the receiver is on-line. • Unreliable transport. (No guarantee the data is delivered)• The receiver do not assemble the data segments.• No flow control• No error control or recovery

Internet

Client

Local

DNS server

. root

DNS server

.no

DNS server

ascom.no

DNS Server

www.ascom.no

Web server

1

2

3

4

5

6

6: Get the web-page

The local DNS server will normally be a caching DNS server

meaning it will remember what it learns reducing traffic and decreasing

respond time. All information has a time-to-live. The information will be

deleted when time-to-live expires.

THE IP ADDRESS CONTINUED

Beyond the original IP classess A, B and C

Classfull IP addresses

• The original classfull divided the unicast

space in three fixed classes

– IP address shortage because of internet

growth as early as 1993

Class First byte between Subnet mask Prefix Max hosts Networks

A 0 and 127 255.0.0.0 /8 16.777.214 128

B 128 and 191 255.255.0.0 /16 65.534 16.384

C 192 and 223 255.255.255.0 /24 254 2.097.152

Prefix Subnet mask - decimal Subnet mask - binary

/8 255.0.0.0 11111111.00000000.00000000.00000000

/16 255.255.0.0 11111111.11111111.00000000.00000000

/24 255.255.255.0 11111111.11111111.11111111.00000000

Network and broadcast

• Two IP addresses of each logical network is

reserved for special purposes. They are

illegal as host IP addresses

– All host bits “0” is the logical network name

– All host bits “1” is the local broadcast IP address

• For example the 192.168.,100.0/24 network

– 192.168.100.0 is the network name

– 192.168.100.255 is the broadcast address

– Usable IP address ranges from

• 192.168.100.1 to 192.168.100.254

• A total of 254 usable addresses

Boson subnet calculator

Subnetting

• Classfull IP addresses

• For example: 172.16.4.5/16

– Network part 172.16

– Host part: 4.5

• Classless IP addresses

• For example 172.16.4.5/24

– Network part: 172.16.4

– Host part: 5

Network part Host part

Network part Subnet part Host part

Classless IP addresses

• Subnettet class B network as /24

– One class B net subnettet to 256 subnets

Network Subnet mask Max hosts

172.16.0.0 255.255.255.0 254

172.16.1.0 255.255.255.0 254

172.16.2.0 255.255.255.0 254

... ... ...

172.16.253.0 255.255.255.0 254

172.16.254.0 255.255.255.0 254

172.16.255.0 255.255.255.0 254

Exponentiation

• Mathematical operation

• Called “potens” in Swedish, Norwegian and

Danish.

• 25 = 2 ^ 5 = 2 * 2 * 2 * 2 * 2 = 32

• 72 = 7 ^ 2 = 7 * 7 = 49

• 264 = 2 ^ 64 = 18.446.744.073.709.551.616

• Often used when dealing with numeric

systems.

Numeric systems II

83677*10^0 = 7*1 = 7

6*10^1 = 6*10 = 60

3*10^2 = 3*100 = 300

8*10^3 = 8*1000 = 8000

Decimal sum = 8367

10

11011*2^0 = 1*1 = 1

0*2^1 = 0*2 = 0

1*2^2 = 1*4 = 4

1*2^3 = 1*8 = 8

Decimal sum = 13

2

The binary byte

111111111*2^0 = 1*1 = 1

1*2^1 = 1*2 = 2

1*2^2 = 1*4 = 4

1*2^3 = 1*8 = 8

Decimal sum = 255

2

1*2^4 = 1*16 = 16

1*2^5 = 1*32 = 32

1*2^6 = 1*64 = 64

1*2^7 = 1*128 = 128

The binary byte

111110000*2^0 = 1*1 = 0

0*2^1 = 1*2 = 0

0*2^2 = 1*4 = 0

1*2^3 = 1*8 = 8

Decimal sum = 248

2

1*2^4 = 1*16 = 16

1*2^5 = 1*32 = 32

1*2^6 = 1*64 = 64

1*2^7 = 1*128 = 128

Classless IP addresses

• To adapt the size of a logical network to

customer networks the classes were

abandoned.

– Subnets is logical networks

prefix Subnet mask Subnets Max hosts

/24 255.255.255.0 1 254

/25 255.255.255.128 2 126

/26 255.255.255.192 4 62

/27 255.255.255.224 8 30

/28 255.255.255.240 16 14

/29 255.255.255.248 32 6

/30 255.255.255.252 64 2

Classless IP addresses

• A binary “1” in the subnet mask means the bit

belongs to the logical network or subnet

• A binary “0” in the subnet mask means the bit

belongs to the host part of the IP address

Prefix Subnet mask - decimal Subnet mask - binary

/24 255.255.255.0 11111111.11111111.11111111.00000000

/25 255.255.255.128 11111111.11111111.11111111.10000000

/26 255.255.255.192 11111111.11111111.11111111.11000000

/27 255.255.255.224 11111111.11111111.11111111.11100000

/28 255.255.255.240 11111111.11111111.11111111.11110000

/29 255.255.255.248 11111111.11111111.11111111.11111000

/30 255.255.255.252 11111111.11111111.11111111.11111100

ROUTING PROTOCOLS

The route table

• The route table is

– used by all hosts – including Routers.

– a list of all logical networks known by the host.

– Used to decide in which direction packets

should be send.

• The route table contains

– Destination network

– Direction

– Distance

The road sign

• Destination, Direction and Distance

Routertable R1

NETWORK SEND TO

195.181.54/24 195.181.54.0

195.181.55/24 192.168.1.10

195.181.56/24 192.168.1.6

0.0.0.0 192.168.1.6

Routertable R2

NETWORK SEND TO

195.181.54/24 192.168.1.9

195.181.55/24 195.181.55.0

195.181.56/24 192.168.1.14

0.0.0.0 192.168.1.14

Routertable R3

NETWORK SEND TO

195.181.54/24 192.168.1.5

195.181.55/24 192.168.1.13

195.181.56/24 195.181.56.0

0.0.0.0 195.181.56.1

Routertable R4

NETWORK SEND TO

195.181.54/24 195.181.56.2

195.181.55/24 195.181.56.2

195.181.56/24 195.181.56.0

0.0.0.0 192.168.1.17

Route tables on routers

I am on the 195.181.54.0/24 network

The destination network for the ping

packets is 195.181.56.0/24

I will send the pakets to my default gateway

Routertable R1

NETWORK SEND TO

195.181.54/24 195.181.54.0

195.181.55/24 192.168.1.10

195.181.56/24 192.168.1.6

0.0.0.0 192.168.1.6

Routertable R2

NETWORK SEND TO

195.181.54/24 192.168.1.9

195.181.55/24 195.181.55.0

195.181.56/24 192.168.1.14

0.0.0.0 192.168.1.14

Routertable R3

NETWORK SEND TO

195.181.54/24 192.168.1.5

195.181.55/24 192.168.1.13

195.181.56/24 195.181.56.0

0.0.0.0 195.181.56.1

Routertable R4

NETWORK SEND TO

195.181.54/24 195.181.56.2

195.181.55/24 195.181.56.2

195.181.56/24 195.181.56.0

0.0.0.0 192.168.1.17

Route tables on routers

I received a packet for 195.181.56.103

My routetable has an entry that says traffic to

195.181.56.0/24 should be sent to 192.168.1.6

Routertable R1

NETWORK SEND TO

195.181.54/24 195.181.54.0

195.181.55/24 192.168.1.10

195.181.56/24 192.168.1.6

0.0.0.0 192.168.1.6

Routertable R2

NETWORK SEND TO

195.181.54/24 192.168.1.9

195.181.55/24 195.181.55.0

195.181.56/24 192.168.1.14

0.0.0.0 192.168.1.14

Routertable R3

NETWORK SEND TO

195.181.54/24 192.168.1.5

195.181.55/24 192.168.1.13

195.181.56/24 195.181.56.0

0.0.0.0 195.181.56.1

Routertable R4

NETWORK SEND TO

195.181.54/24 195.181.56.2

195.181.55/24 195.181.56.2

195.181.56/24 195.181.56.0

0.0.0.0 192.168.1.17

Route tables on routers

I received a packet for 195.181.56.103

My routetable has an entry that says traffic to

195.181.56.0/24 should be sent to the

connected 195.181.56.0/24 network

Routertable R1

NETWORK SEND TO

195.181.54/24 195.181.54.0

195.181.55/24 192.168.1.10

195.181.56/24 192.168.1.6

0.0.0.0 192.168.1.6

Routertable R2

NETWORK SEND TO

195.181.54/24 192.168.1.9

195.181.55/24 195.181.55.0

195.181.56/24 192.168.1.14

0.0.0.0 192.168.1.14

Routertable R3

NETWORK SEND TO

195.181.54/24 192.168.1.5

195.181.55/24 192.168.1.13

195.181.56/24 195.181.56.0

0.0.0.0 195.181.56.1

Routertable R4

NETWORK SEND TO

195.181.54/24 195.181.56.2

195.181.55/24 195.181.56.2

195.181.56/24 195.181.56.0

0.0.0.0 192.168.1.17

Route tables on routers

I received a ping packet from 195.181.54.101

I will respond with a “pong” packet.

195.181.54.101 is on another logical network

so I will send the packet to my default gateway

Route table creation

• The route table in routers can be created

and maintained in two ways

1: Static route table entry

• Entries are entered manually

2: Dynamic route table entry

• Entries are sent between routers automatically

• Require the use of a Routing protocol – such as

– RIP, OSPF, IS-IS or BGP

Static vs. dynamic

• Static routes

– Routes entered manually by administrators

– Routes changed manually by administrators

– Time consuming and error prone

• Dynamic routes

– Routes automatically entered by a routing

protocol.

– Routes automatically changed by a routing

protocol.

Routing protocols

• A Routing Protocol is a protocol that

exchanges routing information between

routers.

• A router receives routing information from

other routers and learn their logical

networks.

• Popular routing protocols

– RIP, OSPF, BGP,EIGRP,IS-IS

RIP

• RIP – Routing Information Protocol – is a

popular routing protocol.

– Measures distance in HOP’s

– HOP’s is equal to numbers of routers on the

way to the distant logical network.

• RIP is a Distance Vector Routing protocol

– Distance = Number of HOP’s to destination

network

– Vector = Direction of destination network.

(Which neighbor to send packets to)

Route table R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

R1, R2 and R3 just booted

R4 swithced off

Route table R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

Route table R3

NETWORK

NETWORK

SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

X

When a Router is booted – it will know only the IP

addresses and subnet masks of the logical networks

connected to its physical ports.

It will also know it is using the routing protocol RIP.

It has been configured by a technician.

RIP

• RIP will transmit its Routing table to its

neighbor routers every 30. seconds.

• The neighbors will learn the transmitting

routers logical networks.

• The neighbors will transmit their routing

tables so the local router learns their

logical networks.

Route table R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

R1 updates R2Route table R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

192.168.1.8/30 192.168.1.9 2

Route table R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

R1

X

R2 receives a copy of R1

route table and insert it into its

own routing table

Route table R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

Two 192.168.1.8/30?Route table R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

192.168.1.8/30 192.168.1.9 2

Route table R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

R1

X

A logical network can only

have one entry in the routing

table. 192.168.1.8/30 is

represented twice. One with a

HOP count of 1 and one with

a HOP count of 2

A logical network can only

have one entry in the routing

table. 192.168.1.8/30 is

represented twice. One with a

HOP count of 1 and one with

a HOP count of 2

Route table R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

Shortest HOP count chosenRoute table R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

Route table R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

R1

X

The best route to a destination

network is the route with the

lowest number of HOP’s

Route table R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

R1 updates R3Route table R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

Route table R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

195.181.54/24 192.168.1.5 2

192.168.1.8/30 192.168.1.5 2

R

1

X

R1 also updates the neighbor

R3. R3 learns R1’s network.

Route table R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

R2 updates R3Route table R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

Route table R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

195.181.54/24 192.168.1.5 2

192.168.1.8/30 192.168.1.5 2

195.181.55/24 192.168.1.13 2X

Route table R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

195.181.55/24 192.168.1.10 2

192.168.1.12/30 192.168.1.10 2

195.181.56/24 192.168.1.6 2

All routers updatetRoute table R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

195.181.56/30 192.168.1.14 2

Route table R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

195.181.54/24 192.168.1.5 2

192.168.1.8/30 192.168.1.5 2

195.181.55/24 192.168.1.13 2X

Route table R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

195.181.55/24 192.168.1.10 2

192.168.1.12/30 192.168.1.10 2

195.181.56/24 192.168.1.6 2

R4 the Default Gateway

switchet on

Route table R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

195.181.56/30 192.168.1.14 2

Route table R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

195.181.54/24 192.168.1.5 2

192.168.1.8/30 192.168.1.5 2

195.181.55/24 192.168.1.13 2

Route table R4

NETWORK SEND TO HOP

195.181.56/30 195.181.56.1 1

192.168.1.16/30 192.168.1.18 1

0.0.0.0 192.168.1.17 2

R4 is a little special as it is

holds the Default Route to the

internet. It is statically

configured by a technician in

this case.

Route table R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

195.181.55/24 192.168.1.10 2

192.168.1.12/30 192.168.1.10 2

195.181.56/24 192.168.1.6 2

192.168.1.16/30 192.168.1.6 3

0.0.0.0 192.168.1.6 4

Convergence!

Everybody knows everybody

Route table R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

195.181.56/30 192.168.1.14 2

192.168.1.16/30 192.168.1.14 3

0.0.0.0 192.168.1.14 4

Route table R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

195.181.54/24 192.168.1.5 2

192.168.1.8/30 192.168.1.5 2

195.181.55/24 192.168.1.13 2

192.168.1.16/30 195.181.56.1 2

0.0.0.0 195.181.56.1 3

Route table R4

NETWORK SEND TO HOP

195.181.56/30 195.181.56.1 1

192.168.1.16/30 192.168.1.18 1

192.168.1.4/30 195.181.56.2 2

192.168.1.12/30 195.181.56.2 2

195.181.54/24 195.181.56.2 3

195.181.55/24 195.181.56.2 3

192.168.1.8/30 195.181.56.2 3

0.0.0.0 192.168.1.17 2

R3 updates R4.

R4 updates R3 which updates

R1 and R2

RIP - Technically

• Maximum HOP-Count = 15

–Network diameter should be below 15 routers

• HOP-Count = 16 means network unreachable

• RIP exist in two versions

–Version 1

• Uses broadcast and only allow classfull IP networks

–Version 2

• Uses multicast and allows classless IP networks

Route tabel R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

195.181.55/24 192.168.1.10 2

192.168.1.12/30 192.168.1.10 2

195.181.56/24 192.168.1.6 2

192.168.1.16/30 192.168.1.6 3

0.0.0.0 192.168.1.6 4

When changes occursRoute tabel R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

195.181.56/30 192.168.1.14 2

192.168.1.16/30 192.168.1.14 3

0.0.0.0 192.168.1.14 4

Route tabel R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

195.181.54/24 192.168.1.5 2

192.168.1.8/30 192.168.1.5 2

195.181.55/24 192.168.1.13 2

192.168.1.16/30 195.181.56.1 2

0.0.0.0 195.181.56.1 3

Route tabel R4

NETWORK SEND TO HOP

195.181.56/30 195.181.56.1 1

192.168.1.16/30 192.168.1.18 1

192.168.1.4/30 195.181.56.2 2

192.168.1.12/30 195.181.56.2 2

195.181.54/24 195.181.56.2 3

195.181.55/24 195.181.56.2 3

192.168.1.8/30 195.181.56.2 3

0.0.0.0 192.168.1.17 2

X

WAN line

Down

Route tabel R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

195.181.55/24 192.168.1.10 2

192.168.1.12/30 192.168.1.10 2

195.181.56/24 192.168.1.6 16

192.168.1.16/30 192.168.1.6 16

0.0.0.0 192.168.1.6 16

R1 and R3 detect change

Neighbor unreachable

Route tabel R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

195.181.56/30 192.168.1.14 2

192.168.1.16/30 192.168.1.14 3

0.0.0.0 192.168.1.14 4

Route tabel R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

195.181.54/24 192.168.1.5 16

192.168.1.8/30 192.168.1.5 16

195.181.55/24 192.168.1.13 2

192.168.1.16/30 195.181.56.1 2

0.0.0.0 195.181.56.1 3

Route tabel R4

NETWORK SEND TO HOP

195.181.56/30 195.181.56.1 1

192.168.1.16/30 192.168.1.18 1

192.168.1.4/30 195.181.56.2 2

192.168.1.12/30 195.181.56.2 2

195.181.54/24 195.181.56.2 3

195.181.55/24 195.181.56.2 3

192.168.1.8/30 195.181.56.2 3

0.0.0.0 192.168.1.17 2

X

Route tabel R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

195.181.55/24 192.168.1.10 2

192.168.1.12/30 192.168.1.10 2

195.181.56/24 192.168.1.10 3

192.168.1.16/30 192.168.1.10 4

0.0.0.0 192.168.1.10 5

New routes installed

in route table

Route tabel R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

195.181.56/30 192.168.1.14 2

192.168.1.16/30 192.168.1.14 3

0.0.0.0 192.168.1.14 4

Route tabel R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

195.181.54/24 192.168.1.13 3

192.168.1.8/30 192.168.1.13 2

195.181.55/24 192.168.1.13 2

192.168.1.16/30 195.181.56.1 2

0.0.0.0 195.181.56.1 3

Route tabel R4

NETWORK SEND TO HOP

195.181.56/30 195.181.56.1 1

192.168.1.16/30 192.168.1.18 1

192.168.1.4/30 195.181.56.2 2

192.168.1.12/30 195.181.56.2 2

195.181.54/24 195.181.56.2 3

195.181.55/24 195.181.56.2 3

192.168.1.8/30 195.181.56.2 3

0.0.0.0 192.168.1.17 2

X

Route tabel R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

195.181.55/24 192.168.1.10 2

192.168.1.12/30 192.168.1.10 2

195.181.56/24 192.168.1.10 3

192.168.1.16/30 192.168.1.10 4

0.0.0.0 192.168.1.10 5

What happens when

WAN works again?

Route tabel R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

195.181.56/30 192.168.1.14 2

192.168.1.16/30 192.168.1.14 3

0.0.0.0 192.168.1.14 4

Route tabel R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

195.181.54/24 192.168.1.13 3

192.168.1.8/30 192.168.1.13 2

195.181.55/24 192.168.1.13 2

192.168.1.16/30 195.181.56.1 2

0.0.0.0 195.181.56.1 3

Route tabel R4

NETWORK SEND TO HOP

195.181.56/30 195.181.56.1 1

192.168.1.16/30 192.168.1.18 1

192.168.1.4/30 195.181.56.2 2

192.168.1.12/30 195.181.56.2 2

195.181.54/24 195.181.56.2 3

195.181.55/24 195.181.56.2 3

192.168.1.8/30 195.181.56.2 3

0.0.0.0 192.168.1.17 2

X

Route tabel R1

NETWORK SEND TO HOP

195.181.54/24 195.181.54.1 1

192.168.1.4/30 192.168.1.5 1

192.168.1.8/30 192.168.1.9 1

195.181.55/24 192.168.1.10 2

192.168.1.12/30 192.168.1.10 2

195.181.56/24 192.168.1.6 2

192.168.1.16/30 192.168.1.6 3

0.0.0.0 192.168.1.6 4

It returns to shortest

HOP count at the next

updates among the routers

Route tabel R2

NETWORK SEND TO HOP

195.181.55/24 195.181.55.1 1

192.168.1.8/30 192.168.1.10 1

192.168.1.12/30 192.168.1.13 1

195.181.54/24 192.168.1.9 2

192.168.1.4/30 192.168.1.9 2

195.181.56/30 192.168.1.14 2

192.168.1.16/30 192.168.1.14 3

0.0.0.0 192.168.1.14 4

Route tabel R3

NETWORK SEND TO HOP

195.181.56/24 195.181.56.2 1

192.168.1.4/30 192.168.1.6 1

192.168.1.12/30 192.168.1.14 1

195.181.54/24 192.168.1.5 2

192.168.1.8/30 192.168.1.5 2

195.181.55/24 192.168.1.13 2

192.168.1.16/30 195.181.56.1 2

0.0.0.0 195.181.56.1 3

Route tabel R4

NETWORK SEND TO HOP

195.181.56/30 195.181.56.1 1

192.168.1.16/30 192.168.1.18 1

192.168.1.4/30 195.181.56.2 2

192.168.1.12/30 195.181.56.2 2

195.181.54/24 195.181.56.2 3

195.181.55/24 195.181.56.2 3

192.168.1.8/30 195.181.56.2 3

0.0.0.0 192.168.1.17 2

Routing protocols

• Routing protocols keep the routing tables

up-to-date in the routers.

• Routing protocols like RIP are used in

small companies.

• OSPF and EIGRP are used in enterprises.

• The Internet uses BGP as a worldwide

routing protocols keeping track of 300.000

to 400.000 routes.

DI-614+

Wireless

Broadband

Router

LINK/ACT

Speed 10/100M4321WLANWAN

M1

M2

PowerD-Link

Firewalls and NAT

NAT: Network Address Translation

ADSL physical

Internettet

ADSL

Modem

Bolig

DI-614+Wireless

Broadband

Router

LINK/ACT

Speed 10/100M4321WLANWAN

M1

M2

PowerD-Link

ADSL logical

Home

Internet

provider

Home

ADSL Router

with NAT

19

2.1

68

.0.0

/24

1

101

102

103

9

10

Home

Home

80.1

.9.1

2/3

0

BBRAS

80.1.9.8/30

22

14

13

80.1

.9.1

6/30

18

17

21

80.1.9.20/30

Small home Router

Internet

provider

Home

19

2.1

68

.0.0

/24

1

101

102

103

9

10

BBRAS

80.1.9.8/30

SOHO Router

OutsideInside

DHCP

Client

DHCP

Server

Internet provider

DHCP Server

F

I

R

E

W

A

L

L

and

N

A

TDHCP

Clients

NAT translation

private IP addresses

• NAT: Network Address Translation

-one to one IP address translation

• Translates IP addresses from inside to outside network

• Private IP adresses allocated to be used behind NAT

-10.0.0.0/8

- 10.0.0.0 to 10.255.255.255

-172.16.0.0/12

- 172.16.0.0 to 172.31.255.255

-192.168.0.0/16

- 192.168.0.0 to 192.168.255.255

• NAT hides the inside network (LAN) from the outside

NAT table on the router

Internet

SOHO Router

with NAT

Inside net: 192.168.0.0/24

From

Protocol

To

From

To

Inside network NAT table Outside networkProtocol

NAT tabel

101 102 103

1WAN address

Outside net: 81.1.30.9/32

80.80.12.116

194.255.14.8

Dynamic NAT table

Internet

SOHO Router

with NAT

Inside net: 192.168.0.0/24

From

192.168.0.101

Protocol

TCP

To

80.80.12.116

From

To

NAT tabelProtocol

NAT tabel

101 102 103

1WAN address

Outside net: 81.1.30.9/32

80.80.12.116

194.255.14.8

From IP

192.168.0.101Data TCP

to IP

80.80.12.116

Inside network NAT table Outside network

NAT table

From inside to outside IP address

InternetSOHO Router

With NAT

Inside net: 192.168.0.0/24

From

192.168.0.101

Protocol

TCP

To

80.80.12.116

From

81.1.30.9

To

80.80.12.116

NAT tabelProtocol

TCP

NAT tabel

101 102 103

1

WAN address

Outside net: 81.1.30.9/32

80.80.12.116

194.255.14.8

From IP

192.168.0.101Data TCP

To IP

80.80.12.116

From IP

81.1.30.9Data TCP

To IP

80.80.12.116

Indre YdreInside network NAT table Outside network

NAT table – Return packets

InternetSOHO Router

with NAT

Inside net: 192.168.0.0/24

From

192.168.0.101

Protocol

TCP

To

80.80.12.116

From

81.1.30.9

To

80.80.12.116

NAT tabelProtocol

TCP

NAT tabel

101 102 103

1

WAN adsress

Outside net: 81.1.30.9/32

80.80.12.116

194.255.14.8

Data TCPTo IP

192.168.0.101Data TCP

To IP

81.1.30.9

Indre Ydre

From IP

80.80.12.116From IP

80.80.12.116

Inside network NAT table Outside network

NAT and PAT

• TCP and UDP uses port numbers.

• NAT/PAT software keeps track on connections using:

- Protocol ( eg. TCP)

- Inside from IP ( eg. 192.168.0.101)

- Inside from port ( eg. Port 1152)

- Out side to IP ( eg. 80.80.12.116)

- Out side to port ( eg. port 80)

• The five parameters describe a unique connection

NAT and PAT

InternetSOHO Router

with NAT and PAT

Inside net: 192.168.0.0/24

From

192.168.0.101:1152

Protocol

TCP

To

80.80.12.116:80

From

81.1.30.9:1152

To

80.80.12.116:80

NAT tabelProtocol

TCP

NAT tabel

101 102 103

1

WAN address

Outside net: 81.1.30.9/32

80.80.12.116

194.255.14.8

DataT

C

P

To IP

80.80.12.116

Indre Ydre

From IP

192.168.0.101

To port

80

From

port

1152Data

T

C

P

To IP

80.80.12.116

From IP

81.1.30.9

To port

80

From

port

1152

Inside network NAT table Outside network

Portnumber

PAT finds unused Port

InternetSOHO Router

with NAT and PAT

Inside net: 192.168.0.0/24

From

192.168.0.101:1152

Protocol

TCP

To

80.80.12.116:80

From

81.1.30.9:1152

To

80.80.12.116:80

NAT tabelProtocol

TCP

192.168.0.102:1152TCP 80.80.12.116:80 81.1.30.9:2345 80.80.12.116:80TCP

NAT tabel

101

102

103

1

WAN address

Ydre net: 81.1.30.9/32

80.80.12.116

194.255.14.8

DataT

C

P

To IP

80.80.12.116

Indre Ydre

From IP

192.168.0.102

To port

80

From

port

1152Data

T

C

P

To IP

80.80.12.116

From IP

81.1.30.9

To port

80

From

port

2345

Inside network NAT table Outside network

Unused port on outside found

PAT sikrer korrekt levering

InternetSOHO Router

with NAT and PAT

Inside net: 192.168.0.0/24

From

192.168.0.101:1152

Protocol

TCP

To

80.80.12.116:80

From

81.1.30.9:1152

To

80.80.12.116:80

NAT tabelProtocol

TCP

192.168.0.102:1152TCP 80.80.12.116:80 81.1.30.9:2345 80.80.12.116:80TCP

NAT tabel

101

102

103

1

WAN adresse

Outside net: 81.1.30.9/32

80.80.12.116

194.255.14.8

DataT

C

P

To IP

192.168.0.102

Indre Ydre

From IP

80.80.12.116

To port

1152

From

port

80Data

T

C

P

To IP

81.1.30.9

From IP

80.80.12.116

To port

2345

From

port

80

Inside network NAT table Outside network

Always unique ports

InternetSOHO Router

with NAT and PAT

Inside net: 192.168.0.0/24

From

192.168.0.101:1152

Protocol

TCP

To

80.80.12.116:80

From

81.1.30.9:1152

To

80.80.12.116:80

NAT tabelProtocol

TCP

192.168.0.102:1152TCP 80.80.12.116:80 81.1.30.9:2345 80.80.12.116:80TCP

192.168.0.101:1153TCP 80.80.12.116:80 81.1.30.9:1153 80.80.12.116:80TCP

NAT tabel

101

102

103

1

WAN address

Outside net: 81.1.30.9/32

80.80.12.116

194.255.14.8

DataT

C

P

To IP

192.168.0.101

Indre Ydre

From IP

80.80.12.116

From

port

80Data

T

C

P

To IP

81.1.30.9

From IP

80.80.12.116

From

port

80

To port

1153To port

1153

Inside network NAT table Outside network

Important if for example

two browser windows

connect to same server

DNS SERVERRoles and functions

DNS server roles

• Master DNS server

– Administrate DNS zones• For example: ascom.se

• Slave DNS server

– Receives zone information from master server• Acts as redundant server and ofloads the master

• Caching DNS server

– Caches (stores) information learnt• Flushes information when TTL – Time to Live - expires

Company example

DHCP Client

Net: 194.182.53/24 1 3

DHCP Server

DNS Configuration:

WWW.ASCOM.SE is 194.182.53.2

DNS.ASCOM.Se is 194.182.53.3

Forward unknown requests to 192.71.13.54

Router/

Firewall

Internet

DNS server

192.71.13.54

DHCP Client

WEB server DNS Server

2

4

DHCP Configuration:

Ip address scope: 194.182.53.10 to 194.182.53.199

Subnet mask: 255.255.255.0

DNS server: 194.182.53.3

Default gateway: 194.182.53.1

DNS zone records

• A - Address record

– An A-record is used to give a host a name• For example www.ascom.se

• Default nslookup type=A

DNS zone records

• SOA - Start Of Authority record

– Name and mail address on the authority of the domain

DNS zone records

• NS - Name Server record

– Shows DNS servers for the domain.

The order of the servers are

Changed for each reply for

Allowing load sharing to the

DNS servers.

DNS zone records

• MX – Mail eXchange

– Shows Mail servers for the domain.• The ascom.se domain has two mail servers

– Mail.ascom.se and mail.ascom.nl

– The mailserver with lowest preference has highest priority and will beused first. If unreachable the next lowest preference is tried.

• The IP address of the mail server(s) is found using a A-record lookup

Windows DNS Server

• Windows server version 2003, 2008 and 2012 has intutiveDNS server management tools.

• mail.mydomain.com A record points to 83.90.47.90

• www.mydomain.com A record points to 83.90.47.30

• mail.mydomain.com MX record (preference=10)

• mail.myotherdomain.dk MX record (preference=20)

DHCP SERVER

Server 1DNS

DHCP

Server 2FIL PRINT

1

192.168.0.2

Building 2

Client

192.168.200.0/24

1

R1

Internet

DHCP172.30.0.0/30

1 2

Building 1

192.168.0.3

DHCP

DHCP

SW1

Client

254

SW2

Building 3

192.168.210.0/24

1

6

DHCP

SW3

2

R3R2

Client

172.30.0.4/305

Printer

DHCP

Client

DHCP example

DHCP Client

Net: 194.182.53/24 1

3

DHCP Server

Static IP address

DHCP lease pool on server:

IP address range: 194.182.53.10 - 194.182.53.199

Subnet mask: 255.255.255.0

DNS server: 192.71.13.54

Default gateway: 194.182.53.1

ROUTER

Internet

DNS server

192.71.13.54

DHCP Client

DHCP Client DHCP

Server(s)

Network

1. DHCP-Discover

3. DHCP-Request

4. DHCP-Ack

2. DHCP-Offer

DHCP server

• The DHCP Discover packet is a broadcast

and is limited to OSI layer 2.

– Blocked by Routers

• Professional routers can function as

DHCP-relays relaying the DHCP packets

from a physical network to the DHCP

server

DHCP Relayone server many logical networks

Server 1DNS

DHCP

Server 2FIL PRINT

1

192.168.0.2

Building 2

Client

192.168.200.0/24

1

R1

Internet

DHCP172.30.0.0/30

1 2

Building 1

192.168.0.3

DHCP

DHCP

SW1

Client

254

SW2

Building 3

192.168.210.0/24

1

6

DHCP

SW3

2

R3R2

Client

172.30.0.4/305

Printer

DHCP

Client

DHCP relay configured on

Router interface facing the

DHCP clients to forward incoming .

DHCP packets to 192.168.0.2

DHCP relay configured is on

router interfaces facing the

DHCP clients to forward incoming .

DHCP packets to 192.168.0.2

DHCP options

• DHCP options is information the DHCP

clients needs beside the IP Address and

the subnet mask.

• DHCP options examples

– Option 003: IP Address of default gateway

– Option 015: IP Address of DNS server(s)

– Option 150: IP Address of TFTP server

• Trival File Transfer Protocol

– Option 042: IP Address of NTP server

• Network Time Protocol

DHCP options

• Windows DHCP server options

configuration example

• TFTP servers are often used to store IP

phones configuration files.

Configuring IP phones

Net: 194.182.53/24 1

3

DHCP Server

Router/

Firewall

Internet

DNS server

192.71.13.54

DHCP Client

FTP server IP Telephone

server

2

4

DHCP Configuration:

Ip address scope: 194.182.53.10 to 194.182.53.199

Subnet mask: 255.255.255.0

DNS server: 192.71.13.54

Default gateway: 194.182.53.1

Option 150 (TFTP) 194.182.53.2

1 2ABC

3DEF

4 5JKL

6MNOGHI

7 8TUV

9WXYZPQRS

* 0OPER

#

7960CISCO IP PHONE

imessages directories

settingsservices

1 2ABC

3DEF

4 5JKL

6MNOGHI

7 8TUV

9WXYZPQRS

* 0OPER

#

7960CISCO IP PHONE

imessages directories

settingsservices

IP Telephone

DHCP ClientIP Telephone

DHCP Client

DHCP Client

Thank you for listening

top related