Sunteți pe pagina 1din 24

IP Address

IP > Internet protocol

Version 4 and 6

IP Addressing
Routing
deny or permit ( access-list )

access-list 1 permit 10.0.0.2


access-list 1 deny any

interface fastethernet 0/1


ip access-group 1 in

NAT

source port: 1024 to 65535

Destination port: 0 to 1023

TCP/IP: TCP, IP, DNS, DHCP, Telnet, FTP, http, https, SMTP, SNMP, POP3,
Tftp, Syslog, NTP, ICMP, ARP, UDP...

OSI Reference model

layer 7 Application layer DNS( www.google.com) layer 6


Presentation layer W->80->119 119 119 46 103 111 111 103 108
layer 5 Session layer RAM->session 1001 saving 119 119 119 46 103 111 111
103 108
layer 4 Transport layer TCP or UDP segment :sport:1024 119 119 119 46 103 111 111
103 108 DP: 53
layer 3 Network layer ip :(( sip:192.168.1.6(sport:1024 119 119 119 46 103 111 111
103 108 DP: 53) DIP: 106.51.113.2, TTL: 128, version:4
Protocol: UDP ))
layer 2 datalink layer smac:00-23-F8-30-96-11(( sip:49.204.129.122(sport:1024 119
119 119 46 103 111 111 103 108 DP: 53) DIP: 106.51.113.2, TTL: 128, version:4
Protocol: UDP )) Dmac: 98-fc-11-bd-62-d6, prot: ip, FCS:

1
101 |101 101 101 101...........110
101
------
0 101

110
101
......
001

layer 1 Physical layer

cables:

Co-axial

UTP ( Unshielded Twisted Pair )

OFC ( optic fibre cable )

UTP connector ( RJ 45 )

Copper straight through cable

1.Orange white..............1. Orange white


2.Orange............2. Orange
3.Green white...............3. Green white
4.Blue..............4. Blue
5.Blue white................5. Blue white
6.Green.............6. Green
7.Brown white...............7. Brown white
8.Brown.............8. Brown

copper cross over cable x X ( 1->3, 2-> 6 )

1.Orange white..............1. Green white


2.Orange............2. Green
3.Green white...............3. Orange white
4.Blue..............4. Blue
5.Blue white................5. Blue white
6.Green.............6. Orange
7.Brown white...............7. Brown white
8.Brown.............8. Brown

Rollover or console cable

1.Orange white..............1. Brown


2.Orange............2. Brown white
3.Green white...............3. Green
4.Blue..............4. Blue white
5.Blue white................5. Blue
6.Green.............6. Green white
7.Brown white...............7. orange
8.Brown.............8. Orange white

Router or Switch
console( Roll over) local login for the first time,
to enter and access the router or Switch.

Notes:
Ethernet connectivity, we are going to use straight &
crossover cable.
1. pc and Router always transmits data over cable 1 and 2
2. hub and switch always transmits data over cable 3 and 6

Number systems:

binary ( 2 ) 0 and 1
octal ( 8 ) 0 to 7
decimal( 10 ) 0 to 9
Hexa decimal(16) 0 to 9 and A to F

-5v = 0, +5v = 1

a = 65 -> 0 1 0 0 0 0 0 1

conversion:

100.200.250.150

128 64 32 16 8 4 2 1
0 1 1 0 0 1 0 0
100 = ? 7 6 5 4 3 2 1 0
10 2 2 2 2 2 2 2 2 2
36
4
0

128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0
200 = ? 7 6 5 4 3 2 1 0
10 2 2 2 2 2 2 2 2 2

250 1 1 1 1 1 0 1 0

128 16 4 2
150 1 0 0 1 0 1 1 0

128 32 2 32 16 2 1 64 32 16 8 16 4 1
ipv4: 1 0 1 0 0010 . 001 1 001 1. 01 1 1 1000. 0001 0101

162 . 51 . 120 . 21

ip version 6:
IETF

IANA ( internet assigned Number Authority)

RIR ( Regional INternet Registry)

( APNIC ) Australia ( South Brisbane ) 1.0.0.0

( ARIN ) American Registry for Internet Numbers 8.0.0.0

LACNIC Latin America Cab

RIPE

AFRINIC

1.0.0.0
2.0.0.0
3.0.0.0
4.0.0.0
8.0.0.0 8.8.4.4. and 8.8.8.8
10.0.0.0 private

223.0.0.0

ARIN -> 8.0.0.0 Level 3 network -> isp google 8.8.4.0


8.8.8.0
8.8.3.0
8.8.4.0
8.8.8.0
8.8.4.4 dns A
8.8.8.8 dns B

26.12.2017

3. purpose and functions of various network devices:

3.1 Repeater.....2 port Repeater,


3.2 Hub
3.3 Bridge
3.4 Switch
3.5 Router

hub:

1. layer 1 device
2. PDU: signal
3. CSMA/CD carrier sense multiple access/collision detection

Switch

1. layer 2 device
2. successor to bridge
3.
data communication:

serial and parallel

console and UTP cable

CRC

1 1 1 1 1 1...............1
101 |101 101 101 101 101 101............110
101
..........
101

.....................................
110
101
.....................................
001

duplex:

CRC -> cyclic redundancy check

FCS -> Frame check sequence

ARPA -> Advanced Research Project Agency

encapsulation protocol -> a method of framing a packet.

ethernet family

(smac: 24:34:AB:01:02:03,packet dmac:34:54:fc:01:02:03,


FCS:101,001,prot=0x800)

duplex:
simplex -> always one direction
half duplex -> either sending or receiving at a time.
full duplex -> both sending and receiving is possible
simultaneously.
basic functionality of switch:

1. MAC address learning

2. Frame forwarding, filtering and flooding

3. loop avoidance using STP ( Spanning Tree protocol )

Router functionality
1. path selection
2. packet forwarding
3. packet filtering
4. internetwork communication

27.12.2017

Network topologies

1.Bus
2.Mesh
3.Ring
4.Star
5.Tree
6.Hybrid

pc1.....pc2.......pc3

pc1
/ \
pc2- pc3

pc1
/ \pC2
PC4 /
\pc3

pc1
|
-----
Sw
-----
| \
PC2 PC3

IP Address

TCP/IP protocols

ftp, ssh,telnet, smtp, dns, dhcp,tftp,http, pop3, https, icmp,arp,ip,


tcp,udp...etc..

28.12.2017

IP Addressing

Ip v4 and V6

32 bit 128 bit


100.20.30.40 1234:5678:09AB:CDEF:0001:0002:0003:0004

429 crores 340, 0000 0000 0000, 0000 0000 0000, 0000 0000 0000

ip version:4

Definition:
32 bit binary number (0 and 1)

1010 1000 1011 0110 0001 1001 1011 1100

is divided into 4 octets.


1010 1000 |1011 0110 |0001 1001 |1011 1100

is a dotted decimal number


128 32 8 128 32 16 4 2 16 8 1 128 32 16 8 4
10 10 1000 |10 1 1 0 1 10 |0001 1001 |10 1 1 1 100
168 . 182 . 25 . 188

X is classified into 5 classes namely, class A, B,C, D and E

X private and public ip address

X Portion
/ \
Nework Host

X logical address

it can be assigned as static or dynamic ip address.

classification

Class A (0 to 127) 0|000 0000 . 0000 0000. 0000 0000. 0000 0000
0|000 0000 . 0000 0000. 0000 0000. 0000 0001

0|111 1111 . 1111 1111. 1111 1111. 1111 1111

100.2.3.4 100.0.0.0 100.0.0.1..100.255.255.254, 100.255.255.255


N .H.H.H Network 1st last ip broadcast

128
Class B( 128 to 191) 10|00 0000. 0000 0000. 0000 0000. 0000 0000

10|11 1111. 1111 1111. 1111 1111. 1111 1111

134.31.32.33 134.31.0.0 134.31.0.1 to 134.31.255.254 134.31.255.255


N .N . H. H

class C 110|0 0000. 0000 0000. 0000 0000. 0000 0000


(192 - 223)

110|1 1111. 1111 1111. 1111 1111. 1111 1111

200.10.20.30 200.10.20.0, 200.10.20.1 to 200.10.20.254, 200.10.20.255


N . N. N. H

Class D 1110| 0000.


Multicast address
(224 -239) 1110| 1111.

Class E Reserved
( 240 to 255)

private:

class A 10.0.0.0 1 Network


class B 172.16.0.0 to 172.31.0.0 16 Networks
class C 192.168.0.0 to 192.168.255.0 256 Networks
.............
273 Networks
.............

IETF>

IANA>> internet assigned Number authority

1.0.0.0 RIR ( APNIC )


2.0.0.0 ( AFRINIC )
3.0.0.0 ( RIPE NCC )
4.0.0.0 ( ARIN )
5.0.0.0 ( LACNIC )

8.0.0.0 ( ARIN ) Level3 -> 8.8.4.0/24


223.0.0.0 8.8.8.0/24

IANA -> RIR1 -> ISP1 -> customer1, cust-2

128 64 32 16

A:0 - 127
B:128 - 191
C:192 - 223
D:224 - 239
E:240 - 255
10.

172.16....172.31.0.0

192.168.0... 192.168.255.0

subnetting:

General definition

breaking up of a large network into a number of


smaller networks

Technical definition

borrowing some host bits from host portion and


converting that host bits into network bits.

why subnet?

Airtel 10.128.0.0 ( -)
1
cbe -> 10.0.0.0 ...........
tpr -> 172.16.0.0
mumbai -> 172.17.0.0

10.0.0.0
255.0.0.0
10. 0 . 0 . 0
10.0|000 0000. 0000 0000. 0000 0000 ( subnet add)
1|000 0000. 0000 0000. 0000 0001 ( first ip add)

|111 1111. 1111 1111. 1111 1110 ( last ip add)


|111 1111. 1111 1111. 1111 1111 ( Broadcast add)

10.0.0.0/255.128.0.0 10.0.0.1 to 10.127.255.254 10.127.255.255


10.128.0.0/255.128.0.0 10.128.0.1 to 10.255.255.254 10.255.255.255

10. 0

Refinement >

chennai WAN 1 2ip cbe


LAN 1 LAN 2

100 users 20 users

3x100= 300 ip addresses


FLSM > 1. subnetting based on number of subnets
2. subnetting based on number of hosts

8
class c: 254 ip addresses ( 2 - 2 = 256 -2 =254 )
16
class B: 65354 ip addresses ( 2 - 2 = 65536 -2 = 65534 )
( 0 to 127 )
(128 to 191 ) 172.16.0.0 to 172.31.0.0 ->
(192 to 223 ) 255.255.0.0

method : 1

172.16.0.0
255.255.0.0

number of subnets = 100


1. class : B
step: 1 2. fixed: 2 blocks
n 3. n = 7
formula: 2 = Number of subnets 4. L -> R
n 5. Block size : 2
2 = 100, n = 7 6. New subnetmask:
255.255.254.0

Network|subnet | host |
2
172.16. 0000 000|0 . 0000 0000 ( subnet add)
0000 001|0 . 0000 0001 ( first ip add)
0000 010|
0000 011
0000 100
0000 101

1111 111|1 . 1111 1110 ( last ip address)


1111 111|1 . 1111 1111 ( broadcast address )

subnet address First ip add last ip add broadcast add


1.172.16.0.0 172.16.0.1 172.16.1.254 172.16.1.255
2.172.16.2.0 172.16.2.1 172.16.3.254 172.16.3.255
3.172.16.4.0 172.16.4.1 172.16.5.254 172.16.5.255
4.172.16.6.0 172.16.6.1 172.16.7.254 172.16.7.255
5.172.16.8.0
6.172.16.10.0
7.172.16.12.0
8.172.16.14.0 172.16.14.1 172.16.15.254 172.16.15.255

128.172.16.254.0 172.16.254.1 172.16.255.254 172.16.255.255


pc1..............pc2
172.16.0.1 172.16.2.1
255.255.254.0 255.255.254.0

ping 172.16.2.1

172.16.0.1 to 172.16.1.254

the chennai silks ( 40 branches ) 40 LAN + 39 WAN

79 x 50 = 3950

172.18.0.0 1. class : B
255.255.0.0 2. Fixed: 2 blocks
Number of subnets: 79 3. n = 7
4. L-> R
step :1 5. Block size:
n n 6. Nsnm: 255.255.254.0
2 = number of subnets, 2 = 79, n = 7

step:2
2
172.18.0000 000|0. 0000 0000

Airtel:
1000 LAN + 999 WaN = 1999 subnets

1999x200 = 400000 - 200 = 3, 99, 800

10.0.0.0
255.0.0.0
Number of subnets : 1999 1. class A
step:1 2. fixed: 1 block
n n 3. n = 11
2 = Number of subnets, 2 = 1999, 4. L-> R
0 5. Block size : 32
2 = 1 6. NsNM: 255.255.224.0
1
2 = 2
2
2 = 4
3
2 = 8
4
2 = 16
5
2 = 32
6
2 = 64
7
2 = 128
8
2 = 256
9
2 = 512
10
2 = 1024
11
2 = 2048
12
2 = 4096
13
2 = 8192
14
2 = 16384
15
2 = 32768
16
2 = 65536
17
2 = 1,31,072
18
2 = 2,62,144
19
2 = 5,24,288
20
2 = 10,48,576
21
2 = 20,97,152
22
2 = 41,94,304
23
2 = 83,88,608
24
2 = 1,67,77,216

32
10. 0000 0000. 000|0 0000. 0000 0000

10.0.0.0 10.0.0.1 10.0.31.254 10.0.31.255


10.0.32.0 10.0.32.1 10.0.63.254 10.0.63.255
10.0.64.0

10.255.224.0 10.255.224.1 10.255.255.254 10.255.255.255

SBI:

10,000 branches x 200 ( mumbai )


19999x200 = 4000000

FLSM -> Fixed Length subnet mask

VLSM -> variable Length subnet mask

FLSM >

1. subnet based

2. host based

VLSM:

1. host based.

subnet based:

ABC Ltd 100 Branches x 50


100 LAN + 99 WAN = 199 subnets

Class B 199x 50 = 9950

step: 1
n n
2 = Number of subnets, 2 = 199, n = 8

Notes:
step:2 < net> < subnet > < host >
21
172.16.0000 0000| .0000 0000 1. Class: B
0000 0001| 0000 0001
0000 0010 2. Fixed: 2
1111 1110 3. n = 8
1111 1111| 1111 1111 4. L -> R
5. Block size: 1
6. NSNM:255.255.255.0

subnet add 1st IP last IP Broadcast add


1.172.16.0.0 172.16.0.1 172.16.0.254 172.16.0.255
2.172.16.1.0 172.16.1.1 172.16.1.254 172.16.1.255
3.172.16.2.0
4.172.16.3.0

256.172.16.255.0 172.16.255.1 172.16.255.254 172.16.255.255


DEF Ltd

50 branches x 100

fixed 50 branches:

172.17.0.0 172.17.0.1 172.17.1.254 172.17.1.255


172.17.2.0
172.17.4.0

172.17.254.0

XYZ Ltd:

100 branches x 250 user ( fixed )

100 + 99 = 199 x 250 = 49750

172.18.0.0
255.255.0.0

Number of hosts = 250

step:1 n
2 - 2 = Number of hosts
n
2 - 2 = 250, n = 8 1. class: B
2. fixed: 2
3. n = 8
4. R -> L

step:2

172.18. 0000 0000. 0000 0000

172.18.0.0
172.18.1.0
172.18.2.0

172.18.255.0

192.168.1.0
255.255.255.0
number of hosts: 10
16
192.168.1.0000| 0000
0001
0010

1111

192.168.1.0
192.168.1.16
192.168.1.32

192.168.1.240

1. 172.19.0.0
255.255.0.0

Number of hosts: 500

2. 192.168.2.0
255.255.255.0

Number of subnets: 2000

VLSM

255.0.0.0 = /8

128 6432 16 8 4 2 1
1 1 1 1 1 1 1 1.

255.128.0.0 = /9
255.192.0.0 = /10
255.224.0.0 = /11
255.240.0.0 = /12
255.248.0.0 = /13
255.252.0.0 = /14
255.254.0.0 = /15
255.255.0.0 = /16

255.255.128.0 = /17
255.255.192.0 = /18
255.255.224.0 = /19
255.255.240.0 = /20
255.255.248.0 = /21
255.255.252.0 = /22
255.255.254.0 = /23
255.255.255.0 = /24
255.255.255.128 = /25
255.255.255.192 = /26
255.255.255.224 = /27
255.255.255.240 = /28
255.255.255.248 = /29
255.255.255.252 = /30

2 users 122 users = class C


HO.............BO1
. .
. .
100 users 20 users

192.168.0.0/24 / -> CIDR Notation


Classless Inter Domain Routing

192.168.0.0
255.255.255.0

number of hosts = 100, n = 7


128
192.168.0. 0|000 0000

Network FLSM VLSM


100 192.168.0.0/24 172.16.0.0 192.168.0.0/25
20 192.168.1.0/24 172.16.0.128 192.168.0.128/27
2 192.168.2.0/24 172.16.1.0 192.168.0.160/30
255.255.255.128
192.168.3.0/24 172.16.1.128 192.168.0.164 Free

host based

172.20.0.0
255.255.0.0
Number of hosts = 100
128
172.16.0000 0000 . 0|000 0000

172.16.0.0
172.16.0.128
172.16.1.0

172.16.1.128

VLSM

192.168.0.0
255.255.255.0

number of hosts= 100


n
2 - 2 = number of hosts, n = 7
128
192.168.0. 0|000 0000

192.168.0.0/25
192.168.0.128/27
192.168.0.160/30
192.168.0.164

192.168.0.0
255.255.255.0
number of hosts: 20
n
2 - 2 = 20, n = 5
32
192.168.0.000|0 0000

192.168.0.0
255.255.255.0
number of hosts: 2
n
2 - 2 = 2, n = 2
4
192.168.0.0000 00|00

HO.....2 users..........BO1
. .
. .
200 users 60 users

172.21.0.0
255.255.0.0

Number of hosts: 200


1
172.21. 0000 0000|. 0000 0000

64
172.21.0000 0000. 00|00 0000
4
172.21.0000 0000. 0000 00|00

172.21.0.0/24 200 users


172.21.1.0/26 60 users
172.21.1.64/30 2 users
172.21.1.68

172.22.0.0
255.255.0.0

2 users
HO.............Bo1
. .
. .
500 250 users

172.22.0.0/23 0.1 to 1.254


172.22.2.0/24 2.1 to 2.254
172.22.3.0/30 3.1 to 3. 2
172.22.3.4 Free

skyline /25 32 - 25 = 7
2 - 2 = 128 -2 =126

/28 32 - 28 = 4
2 - 2 = 16 -2 =14

192.168.1.0/28
192.168.1.16
192.168.1.32

192.168.1.96/28

97 - 110
192.168.1.112

ip valid:

192.168.1.7
255.255.255.248

192.168.2.239
255.255.255.252
cable Crimping

1. cable UTP ( RJ 45 )

UTP copper straight through cable

1. Orange White...................... 1.Orange white


2. Orange............................ 2.Orange

3. Green white....................... 3.Green white


4. Blue.............................. 4.Blue

5. Blue White........................ 5.Blue white


6. Green............................. 6.Green

7. Brown white....................... 7.Brown white


8. Brown............................. 8.Brown

1 1 ( 1->3, 2->6 ) 2 2
UTP cross over cable x X
3 3 6 6

1. Orange White...................... 1.Green white


2. Orange............................ 2.Green

3. Green white....................... 3.Orange white


4. Blue.............................. 4.Blue

5. Blue White........................ 5.Blue white


6. Green............................. 6.Orange

7. Brown white....................... 7.Brown white


8. Brown............................. 8.Brown

Notes:
1. UTP straight and cross over cable can be used in ethernet connectivity.

Ethernet > 10 mbps bit Byte


8 1 128 64 32 16 8 4 2 1
Fast Ethernet > 100 Mbps speed 4 GB A = 65 0 1 0 0 0 0 0 1
2mbps 1
Gigabit ethernet > 1000 Mbps 0

10GbitEthernet > 10000 Mbps

100GbitEthernet > 100000 Mbps

2. Pc and Router always transmits data over cable 1 and 2


3. Hub and Switch always transmits data over cable 3 and 6

1. Orange White...................... 1.Orange white


2. Orange............................ 2.Orange

3. Green white....................... 3.Green white


PC 4. Blue.............................. 4.Blue Hub

5. Blue White........................ 5.Blue white


6. Green............................. 6.Green

7. Brown white....................... 7.Brown white


8. Brown............................. 8.Brown

1. Orange White...................... 1.Green white


2. Orange............................ 2.Green

3. Green white....................... 3.Orange white


PC1 4. Blue.............................. 4.Blue Pc2

5. Blue White........................ 5.Blue white


6. Green............................. 6.Orange

7. Brown white....................... 7.Brown white


8. Brown............................. 8.Brown
console or ROll over cable

1. Orange White...................... 1. Brown


2. Orange............................ 2. Brown white

3. Green white....................... 3. Green


4. Blue.............................. 4. Blue white

5. Blue White........................ 5. Blue


6. Green............................. 6. Green white

7. Brown white....................... 7. Orange


8. Brown............................. 8. Orange white

10.2.2018

OSPF ( Open shortest Path First )

Open standard ( Any vendor router, ex; cisco, juniper, HP, Huawei, ZTE,etc..

-> dynamic routing protocol


-> Link state routing protocol
-> no hop count limitation
-> no periodic updates ( hello packet -> 224.0.0.5, router-id )
224.0.0.6

router-id -> highest loopback interface ip address,


highest Physical interface ip address

condition for neighbor discovery:

1. router id should be different

2. Area id should be same.


3. Ip MTU size should be same. ( 1500 bytes )
4. Ip subnet / mask should be same.
5. hello and dead timer should be same. ( default 10 , 40 )

6. ospf process id, which may or may not be same.


7. opsf port priority also may or may not be same.

SPF or Dijkstra Algorithm

Area 0 is backbone Area


Administrative distance : 110
8
metric = cost = 10/ bandwidth

neighbor table >

topology table >

fast convergence

Router(config)# router ospf 1 ( process id: 1 to 65535 )


Router(config-router)#network 10.0.0.2 0.0.0.255 area 1
Router(config-router)#network 20.0.0.2 0.0.0.255 area 1

10.0.0.0 255.0. 0. 0 255.128.0.0 255.255.255.255 - 255.128.0.0


= 0.127.255.255
0 .255.255.255

Eigrp ( Enhanced Interior Gateway Routing Protocol )

-> Dynamic routing protocol


->hybrid Routing protocol

hop count limitation


no periodic updates.

hello packet ( 224.0.0.10 ),

Neighbor discovery:

1. hello packet should be sent by each other.


2. Autonomous system should be same ( ASN : 1 to 65535 )
3. identical metric should be used.

7
metric: 256 x ((10/ minimum bandwidth in kbits ) + (Total-delay/10))

K1 k2 K3 k4 k5

Bandwidth K1 and K3
Reliability
Delay
Loading
Maximum Transmission Unit ( mtu)
Dual algorithm ( Diffusing Update ALgorithm )

D:

Router(config)# router eigrp 100


Router(config-router)#network 10.0.0.0
Router(config-router)#network 20.0.0.0

DHCP ( dynamic Host configuration protocol )

client D R ( D O R A )
Server O A

dhcp client sends a DHCP Discover message to local network

DhcP server sends an offer message to the client.

Dhcp client then sends a Request message to particular DHCP server.

DHCP server reply an acknowledgement message to client.

Dhcp client

dhcp server ->

Router(config)#ip dhcp excluded-address 10.0.0.1 10.0.0.10


Router(config)#ip dhcp pool net10
Router(config-dhcp)#network 10.0.0.0 255.0.0.0
Router(config-dhcp)#default-router 10.0.0.1
Router(config-dhcp)#dns-server 10.0.0.10

Router#show ip dhcp binding

S-ar putea să vă placă și