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 Additional classes 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 -
Between logical net 10 11 12 13 Router 1 Net: 194.182.53/24 WAN link Net: 182.114/16 1.1 Router 61.13 61.14 67.19 112.4
TCP/IP vs. ISO TCP/IP was developed with four layers.
TCP in IP in Ethernet 6 Byte 6 Byte 2 Byte Ethernet data 46 Byte to 1500 Bytes Destination MAC address Ethernet frame Containing IP Packet IP packet (Simplified) 32 bit Source IP Address Source MAC Address 32 bit Destination IP Address Type Protocol IP packet Contains the value 800 showing the Ethernet frame contains an IP packet Data in IP packet. Variable size TCP Packet Frame Check (Checksum CRC) Contains the value 6 indicating the IP packet contains a TCP packet TCP packet (Simplified) Sequence number Data in TCP packet. Variable size Session layer related information Session layer part of TCP (Simplified) Source port Destination Port TCP Data
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
6: Get the web-page Local DNS server 2. root DNS server 3.no DNS server 5 1 Internet 4 ascom.no DNS Server Client 6 www.ascom.no Web server 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 Network part Host part For example: 172.16.4.5/16 Network part 172.16 Host part: 4.5 Classless IP addresses Network part Subnet part Host part For example 172.16.4.5/24 Network part: 172.16.4 Host part: 5
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. 2 5 = 2 ^ 5 = 2 * 2 * 2 * 2 * 2 = 32 7 2 = 7 ^ 2 = 7 * 7 = 49 2 64 = 2 ^ 64 = 18.446.744.073.709.551.616 Often used when dealing with numeric systems.
Numeric systems II 8367 10 7*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 1101 2 1*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
The binary byte 11111111 2 1*2^0 = 1*1 = 1 1*2^1 = 1*2 = 2 1*2^2 = 1*4 = 4 1*2^3 = 1*8 = 8 1*2^4 = 1*16 = 16 1*2^5 = 1*32 = 32 1*2^6 = 1*64 = 64 1*2^7 = 1*128 = 128 Decimal sum = 255
The binary byte 11111000 2 0*2^0 = 1*1 = 0 0*2^1 = 1*2 = 0 0*2^2 = 1*4 = 0 1*2^3 = 1*8 = 8 1*2^4 = 1*16 = 16 1*2^5 = 1*32 = 32 1*2^6 = 1*64 = 64 1*2^7 = 1*128 = 128 Decimal sum = 248
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
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 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 I will send the pakets to my default gateway 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 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 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 Routertable R2 NETWORK SEND TO 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 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 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 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 Routertable R2 NETWORK 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 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 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 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 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 R1 NETWORK SEND TO I received a ping packet from 195.181.54.101 195.181.54/24 195.181.54.0 I will respond with a pong packet. 195.181.55/24 192.168.1.10 195.181.54.101 is on another logical network 195.181.56/24 192.168.1.6 so I will send the packet to my default gateway 0.0.0.0 192.168.1.6 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 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 routes Static vs. dynamic 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)
R1, R2 and R3 just booted R4 swithced off Route table R2 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 NETWORK NETWORK Route table SEND TO R3 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 Route table When a Router NETWORK is booted SEND it TOwill know HOP only the IP 195.181.54/24 195.181.54.1 1 192.168.1.4/30 192.168.1.5 1 connected to 192.168.1.8/30 its physical 192.168.1.9 ports. 1 addresses and subnet masks of the logical networks It will also know it is using the routing protocol RIP. R1 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.
R1 updates R2 R2 receives a copy of R1 route table and insert it into its own routing table Route table R2 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 R1 Route table R3 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 Route table R1 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
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 Two 192.168.1.8/30? Route table R2 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 R1 Route table R3 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 Route table R1 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 chosen The best route to a destination network is the route with the lowest number of HOP s Route table R2 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 R1 Route table R3 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 Route table R1 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 R3 R1 also updates the neighbor R3. R3 learns R1 s network. Route table R2 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 R 1 X 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 Route table R1 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 R3 Route table R2 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 X 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 R1 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
All routers updatet Route table R2 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 X 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 R1 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 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 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 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 Route table R3 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 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
Convergence! Everybody knows everybody Route table R2 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 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 R3 updates R4. R4 updates R3 which updates R1 and R2 Route table R1 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 Route table R4 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
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
When changes occurs WAN line Down Route tabel R2 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 X 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 R1 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 Route tabel R4 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
R1 and R3 detect change Neighbor unreachable Route tabel R2 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 X 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 R1 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 Route tabel R4 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
New routes installed in route table Route tabel R2 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 X 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 R1 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 Route tabel R4 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
What happens when WAN works again? Route tabel R2 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 X 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 R1 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 Route tabel R4 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
It returns to shortest HOP count at the next updates among the routers Route tabel R2 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 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 R1 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 Route tabel R4 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.
Firewalls and NAT NAT: Network Address Translation D-Link Wireless Broadband Router Power M1 M2 WAN WLAN 1 2 3 4 LINK/ACT Speed 10/100M DI-614+
Power M1 M2 WAN WLAN 1 2 3 4 LINK/ACT Speed 10/100M ADSL physical D-Link Wireless Broadband Router DI-614+ Internettet ADSL Modem Bolig
ADSL logical Home 101 102 103 192.168.0.0/24 1 9 ADSL Router with NAT 80.1.9.8/30 10 13 80.1.9.12/30 14 18 BBRAS 22 80.1.9.16/30 80.1.9.20/30 17 21 Home Home Internet provider Home
Small home Router 101 102 192.168.0.0/24 1 Inside F I R E W A L L Outside 9 80.1.9.8/30 BBRAS 10 DHCP Clients 103 Home DHCP Server and N A T SOHO Router DHCP Client Internet provider DHCP Server Internet provider
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 tabel NAT table on the router 80.80.12.116 101 102 103 Inside net: 192.168.0.0/24 1 WAN address Outside net: 81.1.30.9/32 Internet SOHO Router with NAT 194.255.14.8 Inside network NAT table Outside network Protocol From To Protocol From To
NAT tabel Dynamic NAT table 80.80.12.116 101 102 103 Data TCP From IP 192.168.0.101 to IP 80.80.12.116 1 WAN address Outside net: 81.1.30.9/32 Internet Inside net: 192.168.0.0/24 SOHO Router with NAT 194.255.14.8 Protocol TCP Inside network NAT NAT tabel table Outside network From 192.168.0.101 To 80.80.12.116 Protocol From To
NAT tabel NAT table From inside to outside IP address 80.80.12.116 101 102 103 From IP Data TCP 192.168.0.101 To IP 80.80.12.116 1 WAN address Outside net: 81.1.30.9/32 Data TCP From IP 81.1.30.9 To IP 80.80.12.116 Inside net: 192.168.0.0/24 SOHO Router With NAT Internet 194.255.14.8 Protocol TCP Inside Indre network NAT NAT tabel table Outside Ydre network From 192.168.0.101 To 80.80.12.116 Protocol TCP From 81.1.30.9 To 80.80.12.116
NAT tabel NAT table Return packets 80.80.12.116 101 102 103 Data TCP From IP 80.80.12.116 To IP 192.168.0.101 1 WAN adsress Outside net: 81.1.30.9/32 Data TCP From IP 80.80.12.116 To IP 81.1.30.9 Inside net: 192.168.0.0/24 SOHO Router with NAT Internet 194.255.14.8 Protocol TCP Inside Indre network NAT NAT tabel table Outside Ydre network From 192.168.0.101 To 80.80.12.116 Protocol TCP From 81.1.30.9 To 80.80.12.116
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 tabel NAT and PAT 101 102 103 Data From port 1152 To port 80 T C P From IP 192.168.0.101 Inside net: 192.168.0.0/24 To IP 80.80.12.116 1 SOHO Router with NAT and PAT WAN address Outside net: 81.1.30.9/32 Data From port 1152 To port 80 T C P From IP 81.1.30.9 80.80.12.116 To IP 80.80.12.116 Internet 194.255.14.8 Protocol TCP Inside Indre network NAT NAT tabel table Outside Ydre network From 192.168.0.101:1152 To 80.80.12.116:80 Protocol TCP From 81.1.30.9:1152 To 80.80.12.116:80 Portnumber
NAT tabel PAT finds unused Port 80.80.12.116 102 101 Data From port 1152 To port 80 T C P From IP 192.168.0.102 Inside net: 192.168.0.0/24 103 To IP 80.80.12.116 1 SOHO Router with NAT and PAT WAN address Ydre net: 81.1.30.9/32 Data From port 2345 To port 80 T C P From IP 81.1.30.9 To IP 80.80.12.116 Internet 194.255.14.8 Protocol TCP Inside Indre network NAT NAT tabel table Outside Ydre network From 192.168.0.101:1152 To 80.80.12.116:80 Protocol TCP From 81.1.30.9:1152 To 80.80.12.116:80 TCP 192.168.0.102:1152 80.80.12.116:80 TCP 81.1.30.9:2345 80.80.12.116:80 Unused port on outside found
NAT tabel PAT sikrer korrekt levering 80.80.12.116 102 101 Data From port 80 To port 1152 T C P From IP 80.80.12.116 Inside net: 192.168.0.0/24 103 To IP 192.168.0.102 1 SOHO Router with NAT and PAT WAN adresse Outside net: 81.1.30.9/32 Data From port 80 To port 2345 T C P From IP 80.80.12.116 To IP 81.1.30.9 Internet 194.255.14.8 Protocol TCP Inside Indre network NAT NAT tabel table Outside Ydre network From 192.168.0.101:1152 To 80.80.12.116:80 Protocol TCP From 81.1.30.9:1152 To 80.80.12.116:80 TCP 192.168.0.102:1152 80.80.12.116:80 TCP 81.1.30.9:2345 80.80.12.116:80
NAT tabel Always unique ports Important if for example two browser windows connect to same server 80.80.12.116 102 101 Data From port 80 To port 1153 T C P From IP 80.80.12.116 Inside net: 192.168.0.0/24 103 To IP 192.168.0.101 1 SOHO Router with NAT and PAT WAN address Outside net: 81.1.30.9/32 Data From port 80 To port 1153 T C P From IP 80.80.12.116 To IP 81.1.30.9 Internet 194.255.14.8 Protocol TCP Inside Indre network NAT NAT tabel table Outside Ydre network From 192.168.0.101:1152 To 80.80.12.116:80 Protocol TCP From 81.1.30.9:1152 To 80.80.12.116:80 TCP 192.168.0.102:1152 80.80.12.116:80 TCP 81.1.30.9:2345 80.80.12.116:80 TCP 192.168.0.101:1153 80.80.12.116:80 TCP 81.1.30.9:1153 80.80.12.116:80
DNS SERVER Roles 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 DHCP Client 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 Net: 194.182.53/24 1 2 3 Router/ Firewall 4 WEB server DNS Server DHCP Server Internet DNS server 192.71.13.54 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.
MX Mail exchange DNS zone records 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 be used 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 intutive DNS 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 1 DNS DHCP Server 2 FIL PRINT Client Printer Client Client Client 192.168.0.2 192.168.0.3 DHCP 254 DHCP DHCP 2 SW1 DHCP SW2 SW3 1 Building 1 192.168.200.0/24 1 192.168.210.0/24 1 R1 1 2 172.30.0.0/30 DHCP R2 5 Building 2 172.30.0.4/30 6 R3 Building 3 Internet
DHCP Client DHCP Client DHCP example 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 1 Net: 194.182.53/24 3 ROUTER Internet DHCP Server Static IP address DHCP Client 1. DHCP-Discover 2. DHCP-Offer DHCP Server(s) 3. DHCP-Request DNS server 192.71.13.54 4. DHCP-Ack Network
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 Relay one server many logical networks Server 1 DNS DHCP Server 2 FIL PRINT Client Printer Client Client Client 192.168.0.2 192.168.0.3 DHCP 254 DHCP DHCP 2 SW1 DHCP SW2 SW3 1 Building 1 192.168.200.0/24 1 192.168.210.0/24 1 R1 1 2 172.30.0.0/30 DHCP R2 5 Building 2 172.30.0.4/30 6 R3 Building 3 Internet DHCP relay configured is on on router 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.
4 5 GHI JKL 7 8 PQRS TUV # CISCO IP PHONE 7960 messages services directories settings 4 5 GHI JKL 7 8 PQRS TUV # CISCO IP PHONE 7960 messages services directories settings Configuring IP phones IP Telephone DHCP Client DHCP Client IP Telephone DHCP Client DHCP Client 1 2 ABC 3 DEF 6 MNO i 1 2 ABC 3 DEF 6 MNO i * 0 OPER 9 WXYZ * 0 OPER 9 WXYZ 1 Router/ Firewall Net: 194.182.53/24 2 3 4 Internet DNS server 192.71.13.54 FTP server IP Telephone server DHCP Server 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
Thank you for listening