Professional Documents
Culture Documents
Presentation Layer
Upper Layer
Session Layer
Transport
Middle Layer
Network Layer
Data-Link
Bottom Layer
Physical
Protocol Data Units (PDUs) at different layer of OSI model:
Transport Segments
Network
Packets
Data-link Frames
Physical
Functions:
1. Manages end to end message delivery in a network.
2. Provides the error checking and hence guarantees that no
duplication or errors are occurring in the data transfers
across the network.
3. Provides the acknowledgement of the successful data
transmission and retransmits the data if no error free data
was transferred.
4. Provides and error handling and connectionless oriented data
deliver in the network.
Protocols: TCP, SPX, NETBIOS, ATP and NWLINK.
Network Devices:
2. Error Detection.
3. Frames packets.
4. Detects and corrects packets transmit errors (Cyclic
Redundancy Check).
Protocols:
Logical Link Control
error detection and flow control
manages link control.
Media Access Control
communicates with the adapter card
controls the type of media being used:
802.3 Carrier Sense Multiple Access/Collision Detection (CSMA/CD)
802.4 Token Bus (ARCnet)
802.5 Token Ring
802.12 Demand Priority
PDU for Network Layer is: "Packet" and PDU for Data Link Layer is
:"Frame"
3). You have one IP: 192.168.10.29. In which layer this IP works?
Network layer.
4). You are in home. But you need to access the office server
router. How can you do that?
By using "Telnet"
5). DNS uses which protocol? Why?
DNS uses both TCP or UDP or both. UDP can handle only 512bytes.
If data size is withing 512 bytes UDP is used, otherwise, TCP is
used.
6). Which layer is closer to the user?
Upper layer i.e. Application layer is closer to the user.
9) What is IPSec?
IPSec is "Internet Protocol Security". It is a suite of protocols
for securing Internet Protocol(IP) communications.
10). What is the way to establish a TCP connection?
By using acknowledgement.
11). What is the difference between flow control and error
control?
12). Mark one of the most important difference between TCP and
UDP.
TCP is a connection-oriented and UDP is a connection-less
protocol
13). Mention one real place to use TCP/IP.
LAN cards
14). what are the responsibilities of Network Layer?
Logical addressing
23). What are the differences between OSI and TCP/IP model?
Important differences are:
OSI is a reference model and TCP/IP is an implementation of OSI
model.
OSI has 7 layers whereas TCP/IP has only 4 layers
The upper 3 layers of the OSI model is combined on the TCP/IP
model.
OSI has: physical layer, data link layer, network layer,
transport layer, session layer, presentation layer and
application layer TCP/IP has : Network layer, Internet layer,
transport layer and application layer.
24). What are the differences among router, switch, bridge and
hub?
All of them are devices and are used in network. Their
differences are:
In fact, Data Link layer has 2 sublayes: MAC sublayer & LLC
sublayer.
34). As a CCNA candidate, you must know the various layers of the
OSI model. At which layers of the OSI Model do Wide Area Networks
operate in? (Choose two)
A. Physical Layer
B. Datalink Layer
C. Network Layer
D. Session Layer
E. Transport Layer
F. Presentation Layer
G. Application Layer
Ans: A and B
Ans: A
37). A host computer has been correctly configured with a static
IP address, but the default gateway is incorrectly set. Which
layer of the OSI model will be first affected by this
configuration error?
A. Layer 1
B. Layer 2
C. Layer 3
D. Layer 4
E. Layer 5
F. Layer 6
E. Layer 7
Ans: C38). Which layer of the OSI reference model is responsible
for ensuring reliable end-to-end delivery of data?
A.
B.
C.
D.
E.
F.
Application
Presentation
Session
Transport
Network
Data-Link
Ans: D
####IP ADDRESSING####
Internet protocol address is a logical address, assigned to ip
hosts for unique identification.
Number system
Binary 0 and 1
Decimal 0 to 9
Hexadecimal 0 to 9 and A to F
Convert decimal to binary
Convert binary to decimal
Convert binary to hexadecimal
Convert the following decimal numbers into binary
128 10000000
192 11000000
224 11100000
240 11110000
248 11111000
252 11111100
254 11111110
255 11111111
IP Addressing scheme was developed by Internet Assigned Numbers
Authority (IANA)
Two Versions of IP Address
IPV4 32 bit address
IPV6 128 bit address
IPV4 Address
It is a 32-bit logical address. Represented in decimal, binary,
or hexadecimal number system. Separated by period.
Eg: 192.168.10.20
11000000.10101000.00001010.00010100
Classes
Class A 1 to 126
Class B 128 to 191
Class C 192 to 223
Class D 224 to 239 Multicasting
Class E 240 to 255 R&D
Bit variation
1.0.0.0
1.0.0.1
1.0.0.2
1.0.0.255
1.0.1.0
1.0.1.1
1.0.1.2
1.0.1.3
1.0.1.255
1.0.2.0
1.0.2.1
1.0.2.2
1.0.2.255
1.0.255.255
1.1.0.0
1.1.0.1
1.1.0.2
1.1.0.255
1.1.1.0
1.1.1.1
1.1.1.2
1.1.1.255
1.1.2.255
1.1.255.255
1.2.0.0
1.255.255.255
2.0.0.0
NETWORK BIT
HOST BIT
HOST BIT
HOST BIT
11111111.00000000.00000000.00000000
255.0.0.0
Class B
NETWORK BIT
NETWORK BIT
HOST BIT
HOST BIT
11111111.11111111.00000000.00000000
255.255.0.0
Class C
NETWORK BIT
NETWORK BIT
NETWORK BIT
11111111.11111111.11111111.00000000
255.255.255.0
1)192.168.10.50
255.255.255.0
3)172.16.10.25
255.255.0.0
5)10.25.36.98
255.0.0.0
2)192.168.90.25
255.255.255.0
4)172.16.90.25
255.255.0.0
6)10.68.52.47
255.0.0.0
HOST BIT
SUBNETTING:
Eg1:
192.168.10.0/26
11111111.11111111.11111111.11000000
255.255.255.192
No of sub-networks: 22 4 sub-networks
No of hosts per sub-network: 26 -2 62
Block size: 256-192 64
NW:
FH:
192.168.10.1
LH:
192.168.10.62
BA:
---------------------------------------------------------------Eg:
192.168.10.0/25
192.168.10.0/27
172.16.0.0/18
172.16.0.0/24
172.16.0.0/26
10.0.0.0/10
10.0.0.0/18
10.0.0.0/26
####Interview Questions####
1. What valid host range is the IP address 172.16.10.22
255.255.255.240 a part of?
A.
B.
C.
D.
E.
Ans: E
B. 172.16.8.127
C. 172.16.8.191
D. 172.16.8.255
Ans: C
3. What is the broadcast address of the subnet address
192.168.10.33 255.255.255.248?
A.
B.
C.
D.
192.168.10.40
192.168.10.255
192.168.255.255
192.168.10.39
Ans: D
4. If you wanted to have 12 subnets with a Class C network ID,
which subnet mask would you use?
A.
B.
C.
D.
255.255.255.252
255.255.255.248
255.255.255.240
255.255.255.255
Ans: C
5. If you need to have a Class B network address subnetted into
exactly 512 subnets, what subnet mask would you assign?
A.
B.
C.
D.
255.255.255.252
255.255.255.128
255.255.255.0
255.255.255.192
Ans: B
6. If you are using a Class C network ID with two subnets and
need 31 hosts per network, which of the following masks should
you use?
A.
B.
C.
D.
255.255.255.0
255.255.255.192
255.255.255.224
255.255.255.248
Ans: B
7. How many subnets and hosts can you get from the network
192.168.254.0/26?
A.
B.
C.
D.
Ans: B
8. You have the network 172.16.10.0/24. How many subnets and
hosts are available?
A.
B.
C.
D.
Ans: D
255.255.255.0
255.255.254.0
255.255.252.0
255.255.0.0
Ans: B
10. You are the network administrator for RouterSim.com. A user
cannot reach the corporate server from their remote office. The
IP address of the host is 192.168.254.10/24, the default gateway
of the host is 192.168.254.1, and the server is 192.168.10.10/24.
You have the user type the following
from a DOS prompt: ping 192.168.254.10; this is unsuccessful. You
then have the user type: ping 127.0.0.1; this is also
unsuccessful. What could the problem be?
A.
B.
C.
D.
Ans: C
11. You have a Class C 192.168.10.0/28 network. How many usable
subnets and hosts do you have?
A.
B.
C.
D.
16
16
30
62
subnets,
subnets,
subnets,
subnets,
16 hosts
14 hosts
6 hosts
2 hosts
Ans: B
12. You have the network 192.168.10.0/24. How many subnets and
hosts are available?
A.
B.
C.
D.
Ans: B
13. You have a 255.255.255.240 mask. Which two of the following
are valid host IDs?
A.
B.
C.
D.
E.
192.168.10.210
192.168.10.32
192.168.10.94
192.168.10.112
192.168.10.127
Ans: A, C
14. You have a Class B network ID and need about 450 IP addresses
per subnet. What is the best mask for this network?
A.
B.
C.
D.
255.255.240.0
255.255.248.0
255.255.254.0
255.255.255.0
Ans: C
15. Which of the following is a valid host for network
192.168.10.32/28?
A.
B.
C.
D.
192.168.10.39
192.168.10.47
192.168.10.14
192.168.10.54
Ans: A
16. What is the valid host range that host 192.168.10.22/30 is a
part of?
A. 192.168.10.0
B. 192.168.10.16
C. 192.168.10.20
D. 192.168.0.0
Ans: C
2.
3.
ROUTER INTERFACES:
Console Port:
It is a 8-pin modular.
It uses RJ-45 connector.
Used to access the router IOS
Connected to computers com/RS232 port.
Used to configure brand new routers.
We use some software application to gain access to router
Windows: hypertermial or teraterm
Linux: minicom
Ethernet Port:
It is a 8-pin modular.
It uses RJ-45 connector.
It is connected to the switch.
We can have either Ethernet, fastethernet or gigabit Ethernet
port
Ethernet(e)
10 Mbps.
FastEthernet(f)
100 Mbps.
3.
4.
R1# config t
R1(config)# line vty 0 4
R1(config-line)# password ccna
R1(config-line)#login
Setting the console password
R1> enable
R1# config t
R1(config)# line console 0
R1(config-line)# password ccna
R1(config-line)#login
Encrypting all passwords
R1> enable
R1# config t
R1(config)# service password-encryption
R1(config)#exit
R1#show run
Scenario 4: Setting ip addresses to interfaces
Router> enable
Router# show ip int brief
Router# config t
Router(config)# int f0/0
Router(config-if)# ip add 10.0.0.100 255.0.0.0
Router(config-if)#no shut
Router(config-if)# ^z
Router# sh ip int bri
Scenario 5: Connecting to router via telnet
ROM
Circuit Board
Config-Reg
ROM Monitor Mode [prompt will be either: > or rommon>]
Router(config)# Config-reg 0x0000
Boot from ROM and enter RXBOOT mode
[prompt will be: Router_Name(boot)> ]
Router(config)# Config-reg 0x0001
Boot from ROM & check NVRAM for startup [boot] commands
Router(config)# Config-reg 0x0002 [through to 0x000F]
RXBOOT (diagnostics mode, use b to continue boot)
Router(config)# Config-reg 0x2000
Boot from ROM, use NVRAM (upgrade flash in run-from-flash )
Router(config)# Config-reg 0x2101
Boot from ROM, skip NVRAM (disaster recovery)
Router(config)# Config-reg 0x2141
Boot from FLASH, use NVRAM (normal operation)
Router(config)# Config-reg 0x2102
Boot from FLASH, skip NVRAM (password recovery)
Router(config)# Config-reg 0x2142
Routing
Routing is the act of moving information across an internetwork
from a source to a destination.
Three types:
1. Static Routing
2. Dynamic Routing
3. Default Routing
Static Routing
Routes to the different destination networks have to be
entered manually on all the routers by administrator.
Administrator has to update the routing table manually.
It is suitable for small networks.
Router CPU utilization is less.
Scenario 14: Two router configuration
R1-router Configuration
Router> enable
Router# config t
Router(config)#hostname R1
R1(config)# int f0/0
R1(config-if)# ip add 10.0.0.100 255.0.0.0
R1(config-if)# no shut
R1(config-if)# int s0/0
R1(config-if)# ip add 30.0.0.1 255.0.0.0
R1(config-if)# clock rate 64000
R1(config-if)# no shut
R1(config-if)#exit
R1(config)# ip route 20.0.0.0 255.0.0.0 30.0.0.2
R1(config)#exit
R1# Sh ip int brief
R1# sh ip route
R2-Router configuration
Router> enable
Router# config t
Router(config)# hostname R2
R2(config)# int f0/0
R2(config-if)# ip add 20.0.0.100 255.0.0.0
R2(config-if)# no shut
R2(config-if)# int s0/0
R2(config-if)# ip add 30.0.0.2 255.0.0.0
R2(config-if)# no shut
R2(config-if)# exit
R2(config)# ip route 10.0.0.0 255.0.0.0 30.0.0.1
R2(config)# exit
R2# Sh ip int brief
R2# sh ip route
R1-configuration
Router> enable
Router# config t
Router(config)# hostname R1
R1(config)# int f0/0
R1(config-if)# ip add 10.0.0.100 255.0.0.0
R1(config-if)# no shut
R1(config-if)# int s0/0
R1(config-if)# ip add 40.0.0.1 255.0.0.0
R1(config-if)# clock rate 64000
R1(config-if)# no shut
R1(config-if)# exit
R1(config)# ip route 20.0.0.0 255.0.0.0 40.0.0.2
R1(config)# ip route 50.0.0.0 255.0.0.0 40.0.0.2
R1(config)# ip route 30.0.0.0 255.0.0.0 40.0.0.2
R1(config)# exit
R2-configuration
Router> enable
Router# config t
Router(config)# hostname R2
R2(config)# int f0/0
R2(config-if)# ip add 20.0.0.100 255.0.0.0
R2(config-if)# no shut
R2(config-if)# int s0/0
R2(config-if)# ip add 40.0.0.2 255.0.0.0
R2(config-if)# no shut
R2(config-if)# int s0/1
R2(config-if)# ip add 50.0.0.1 255.0.0.0
R2(config-if)# clock rate 64000
R2(config-if)# no shut
R2(config-if)# exit
R2(config)# ip route 10.0.0.0 255.0.0.0 40.0.0.1
R2(config)# ip route 30.0.0.0 255.0.0.0 50.0.0.2
R2(config)# exit
R3-configuration
Router> enable
Router# config t
Router(config)# hostname R3
R3(config)# int f0/0
R3(config-if)# ip add 30.0.0.100 255.0.0.0
R3(config-if)# no shut
R3(config-if)# int s0/0
R3(config-if)# ip add 50.0.0.2 255.0.0.0
R3(config-if)# no shut
R3(config-if)# exit
R3(config)# ip route 20.0.0.0 255.0.0.0 50.0.0.1
R3(config)# ip route 40.0.0.0 255.0.0.0 50.0.0.1
R3(config)# ip route 10.0.0.0 255.0.0.0 50.0.0.1
R3(config)# exit
Default Routing
Administrative Distances
Static route
EIGRP
90
IGRP
100
OSPF
110
RIP
120
External EIGRP
170
Unknown
Routing Protocols
There are three classes of routing protocols:
Distance vector: The distance-vector protocols find the best
path to a remote network by judging distance. Each time a
packet goes through a router, thats called a hop. The route
with the least number of hops to the network is determined to
be the best route.
Eg: RIP and IGRP
Link state: In link-state protocols, also called shortestpath-first protocols, the routers each create three separate
tables. One of these tables keeps track of directly attached
neighbors, one determines the topology of the entire
internetwork, and one is used as the routing table.
Eg: OSPF
Hybrid: Hybrid protocols use aspects of both distance vector
and link state.
Eg: EIGRP.
Configuration:
R1(config)#router RIP
R1(config-router)#network 10.0.0.0
R1(config-router)#network 40.0.0.0
Router# show ip route
Router# debug ip rip It shows the updates sent to the neighbor
routers for every 30 sec.
Router# clear ip route * This allows the routing table to
switch to the new updates by clearing the old entries.
Router# Undebug all To stop all debug commands those are
active.
Router# debug ip routing Displays the dynamic changes made in
the routing table.
Version 2
R1#config t
R1(config)# router rip
R1(config-router)#version 2
####Route Summarization####
Route summarization is a process of minimizing the routes on a
router. i.e. instead of specifying all the network address we
will summarize the networks, so that the routing table size is
minimized.
Example 1:
192.168.0.0/24
11000000.10101000.00000000.00000000
192.168.1.0/24
11000000.10101000.00000001.00000000.
192.168.2.0/24
11000000.10101000.00000010.00000000
192.168.3.0/24
11000000.10101000.00000011.00000000
192.168.4.0/24
11000000.10101000.00000100.00000000
192.168.5.0/24
11000000.10101000.00000101.00000000
192.168.6.0/24
11000000.10101000.00000110.00000000
192.168.7.0/24
11000000.10101000.00000111.00000000
192.168.8.0/24
11000000.10101000.00001000.00000000
192.168.9.0/24
11000000.10101000.00001001.00000000
192.168.10.0/24
11000000.10101000.00001010.00000000
192.168.11.0/24
11000000.10101000.00001011.00000000
192.168.12.0/24
11000000.10101000.00001100.00000000
192.168.13.0/24
11000000.10101000.00001101.00000000
192.168.14.0/24
11000000.10101000.00001110.00000000
192.168.15.0/24
11000000.10101000.00001111.00000000
Example 2:
192.168.10.0/24
11000000.10101000.00001010.00000000
192.168.11.0/24
11000000.10101000.00001011.00000000
192.168.12.0/24
11000000.10101000.00001100.00000000
192.168.13.0/24
11000000.10101000.00001101.00000000
192.168.14.0/24
11000000.10101000.00001110.00000000
192.168.15.0/24
11000000.10101000.00001111.00000000
Allows scalability
Supports VLSM/CIDR
Characteristic
OSPF
RIPv2
RIPv1
Type of protocol
Link state
Distance
vector
Distance
vector
Classless
support
Yes
Yes
No
VLSM support
Yes
Yes
No
Autosummarization
No
Yes
Yes
Manual
summarization
Yes
No
No
Discontiguous
support
Yes
Yes
No
Route
propagation
Multicast on
change
Periodic
multicast
Periodic
broadcast
Path metric
Bandwidth
Hops
Hops
None
15
15
Convergence
Fast
Slow
Slow
Peer
authentication
Yes
Yes
No
Hierarchical
network
Yes (using
areas)
No (flat
only)
No (flat
only)
Updates
Event
triggered
Route table
updates
Route table
updates
Route
computation
Dijkstra
Bellman-Ford
Bellman-Ford
OSPF has many features beyond the few that are listed in the
table, and all of them contribute to a fast, scalable, and
robust protocol that can be actively deployed in thousands of
production networks. OSPF is supposed to be designed in a
hierarchical fashion, which basically means that you can
separate the larger internetwork into smaller internetworks
called areas. This is the best design for OSPF.
Fig. 31
R1(config)#router OSPF 15
R1(config-router)#network 10.0.0.0
0.255.255.255 area 0
R1(config-router)#network 30.0.0.0
0.255.255.255 area 0
R2#config t
R2(config)#access-list 10 deny 10.0.0.0 0.255.255.255
R2(config)#access-list 10 permit any
R2(config)#int f0/0
R2(config-if)#ip access-group 10 out
Destination ip address
Destination port number/protocol
Created at source router
Access-list range from 100 to 199 or 20002699 (expanded
range)
Blocking ICMP
R1(config)#access-list 100 deny icmp 10.0.0.0 0.255.255.255
20.0.0.0 0.255.255.255
R1(config)#access-list 100 permit ip any any
R1(config)#int f0/0
R1(config-if)#ip access
R1(config-if)#ip access-group 100 in
Blocking HTTP
R1(config)#Access-list 101 deny TCP 10.0.0.10 0.0.0.0 30.0.0.10
0.0.0.0 eq 80
R1(config)#Access-list 101 permit ip any any
R1(config)#int f0/0
R1(config-if)#ip access-group 101 in
standard jetking
R1(config-std-nacl)#deny 20.0.0.1
R1(config-std-nacl)#permit any
R1(config)#int f0/0
0.0.0.0
Extended
R1(config)#ip access-list extended sun
R1(config-ext-nacl)#deny TCP 10.0.0.10 0.0.0.0 30.0.0.10
eq www
0.0.0.0
Dynamic NAT.
NAT Overload/Port Address Translation(PAT).
PAT: All client computers use one public IP Address but with
different port numbers and which will be stored in the NAT table.
WAN TECHNOLOGIES
If the routers are in different location we can connect them with
the help of ISP.
We need to purchase a WAN Link
The WAN link may be
DSL Line.
ISDN Line.
Lease Line.
Frame Relay Line.
DSL Line:
Digital Subscriber Line.
Broadband connection, sending multiple frequencies.
Exclusively used to provide the high speed internet
connection.
It offers a bandwidth upto 16 Mbps.
They are not used for connecting remote routers.
It is used in companies to provide internet.
DSL will not be available in all the localities.
It uses DSLAN switch.
For DSL connection you can assign the ip address by 2 ways.
Dynamic: No need to purchase public ip address.
ISP will provide the ip address from the DHCP server.
Static: We need to purchase a public ip address.
Globally you can access router.
DSL Flavors:
SDSL
Symmetric DSL.
Uploading and downloading speed are same.
SDSL Modem
ADSL
Asymmetric DSL
Uploading and downloading speed are different.
Downloading speed will be more than uploading speed.
ADSL Modem
ISDN LINE:
It carries the voice, video, and digital signal simultaneously.
ISDN line is used as a backup link or alternative link.
ISDN line uses BRI (Basic Rate Interface) or PRI (Primary Rate
Interface) port.
It uses RJ45 connector.
ISDN channel
B-channel
D-channel
B-channel
Barrier Channel.
Used for sending the data.
Data transfer rate 64 kbps.
D-channel
Delta channel.
Used for sending the control signals.
Data transfer rate 16 kbps.
Used for establishing and terminating the connection.
ISDN Interface:
BRI port:
2B+1D channel
2x64+16
128 kbps.
PRI Port:
23B+1D
23x64+16
1.47 Mbps
ISDN interface should be marked as passive interface. Updates
will be sent periodically to the ISDN line if you dont make it
passive.
LEASE LINE
It is also known as dedicated line.
It is used to connect one branch office router to another branch
office router.
It established a point to point communication.
DTE
R1
DCE
CSU/DSU
DCE
ISP
DTE
CSU/DSU
R2
PPP configuration
R1#config t
R1(config)#username user1 password jetking
R1(config)#int s0/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication pap/chap
R1(config-if)#^z
FRAME-RELAY LINE
Most popular WAN link.
It offers bandwidth up to 44 mbps.
Depends upon customer requirement.
Frame-relay line is represented as cloud.
Frame relay line used to connect one branch office router to
another branch office outer.
It also uses CSU/DSU modem.
Frame relay line should be connected to serial interface of the
router.
DTE
R1
DCE
CSU/DS
U
DCE
cloud
CSU/DS
U
DTE
R2
Frame-relay Terminology:
1. CIR.
2. DLCI Number.
3. Virtual Circuit.
4. LMI type.
CIR:
Committed Information Rate.
CIR value is equal to customer bandwidth.
If you have more traffic in the cloud you will get the
bandwidth what is committed by ISP.
If you have less traffic in the cloud you will get more
bandwidth than what is committed by the ISP.
DLCI:
Data link connection identifier.
DLCI number is an integer value.
DLCI number will be given by ISP.
Every router port which is connected to a frame relay line
requires a DLCI number.
DLCI number is used to map to the remote router.
Types of VC:
Permanent Virtual Circuit.
Switched Virtual Circuit.
PVC:
Virtual circuit connection will be permanent.
It is very fast.
It is very expensive.
SVC:
Virtual circuit connection will be temporary.
It is very slow.
It is less expensive.
Router establishes connection first and packets will be
sent, after that connection will be terminated.
LMI TYPE:
Local Management Interface.
LMI is used for maintaining the link statistics (fluctuations in
link, traffic etc)
It comes with various standards (Cisco, ANSI, IEEE/q933).
Configuring Frame-relay
R1#config t
R1(config)#int s0/0
R1(config-if)#encapsulation frame-relay
R1(config-if)#frame-relay interface-dlci 100
R1(config-if)#frame-relay lmi-type cisco
R1(config-if)#^z
IPv4
IPv6
IPV4 Address
IPV6 Address
32-bit address
Hexadecimal Format
Example: 192.168.10.100
Example:FE80:0010:0000:0010
:0088:28CB:0001:0281
Loopback address
Loopback address
Ping 127.0.0.1
Ping ::1
Router>enable
Router#config t
Router(config)#int f0/0
Router(config-if)#ipv6 enable
Router(config-if)#ipv6 address 2001:DB8:0:1::/64 eui-64
or
Router(config-if)#ipv6 address FE80::260:3EFF:FE11:6770 linklocal
Router# show ipv6 interface f0/0
SWITCHING
Switch works at data-link layer (layer-2 device).
Switches works with MAC address.
Switches forward the frame from one host to another host.
Switch ports varies from 8 ports, 16 ports, 20 ports, and 24
ports.
Switches available with different ports like ethernet port,
fastethernet port, and gigabit ethernet port.
Types of Switches:
Manageable switch.
Non-manageable switch.
Manageable switch:
Cisco switch
We can configure vlans*.
Console port is present.
Provides security.
L2-Switch:
It works only with MAC address.
It is a layer 2 device.
Routing cannot be performed.
Cannot act as router.
L3-Switch:
It works with both MAC and logical address.
Operates in layer 2 and 3.
Routing can be performed.
You can make L3 switch act as router.
Non-manageable switch:
Local brand
We cannot configure switch.
No console port.
No security.
Switch
Hub
Works in Full-Duplex
Works in Half-Duplex
Functions of Switch:
It performs 3 major tasks
Address Learning
Forwarding and filtering
Loop avoidance
Address Learning:
Switch port always starts with 1
Router port always start with 0
Mac address table will contain all port information
Switch will learn every computer MAC address and it will be
kept in the MAC address table.
Forwarding and filtering:
Unicast message one-to-one communication.
It will forward the frame based on MAC table entry.
Forwarding takes place by comparing destination MAC address
of the frame with the MAC table.
If destination MAC is not present it will broadcast message.
Switch will forward the broadcast message to all the active
port except from which it is received.
Loop Avoidance:
Every switch uses protocol called STP
It allows the redundant link in the network.
Avoid the loop in the network.
CONFIGURING SWITCH
Assigning IP address to administrative vlan:
Switch>enable
Switch#config t
Switch(config)#int vlan 1
By default all ports are in the VLAN1
Switch(config-if)#ip address 10.0.0.100 255.0.0.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#ip default gateway 10.0.0.1
Switch(config) #vlan 2
Switch(config-vlan)#name admin
Switch(config-vlan)#exit
Switch(config)#vlan 3
Switch(config-vlan)#name production
Switch(config-vlan)#exit
[VLAN-no ranges from 2 to 1001]
Allocating the ports to the VLANs
Switch(config)#int f0/1
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#int f0/2
Switch(config)#int f0/24
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
By default, trunk port of the switch is in VLAN1. So this port
should be configured as trunk port to carry all Vlan information.
VLAN Trunking Protocol
It makes administrative easy.
It sends VLAN information from one switch to another switch.
Maintains uniform VLAN configuration throughout the switch.
Server By default, all switches are in Server mode. Vlans can
configured in created in this mode.
Clients No changes can be made in client mode.
Transparent will not take any condition; it just forwards the
conditions to the other switches.
Switch(config)#VTP domain jetking
Switch(config)#VTP mode server/client/transparent
Switch(config)#do show vtp status
Inter-vlan communication
Configuring Router
Router(config)#int f0/0
Router (config-if)#no ip address
Router (config-if)#no shutdown
Router (config-if)#exit
Router(config)#int f0/0 .1
Router(config-subif)#encapsulation dot1q <vlan no.>
Router(config-subif)#encapsulation dot1q 2
Router(config-subif)#ip add 10.1.0.1 255.255.0.0
Router(config)#int f0/0 .2
Router(config-subif)#encapsulation dot1q <vlan no.>
Router(config-subif)#encapsulation dot1q 3
Router(config-subif)#ip add 10.2.0.1 255.255.0.0
Switch#sh MAC-address-table
Switch#sh vlan bri
Switch#sh VTP status
Switch#sh spanning-tree
Virtual private network is a method of encrypting pointto-point logical connections across a public network, such as the
Internet. This allows secure communications across a public
network.
Three typical categories of VPNs
Remote access VPNs
Site-to-site VPNs
Extranet VPNs