Professional Documents
Culture Documents
254)) -
> Switch -> Remote Host 2 (10.1.2.1), host 1 to host 2 to talk to each other [[WHEN
NO GATEWAY IS SET... we are setting a "gateway of last resort"]]
Host1> enable
Host1# conf t
Host1(config)# ip route 0.0.0.0 0.0.0.0 10.1.1.254 [this means, when Host1 does not
know where to forward traffic without a gateway, it will go to 10.1.1.254)
...similarly... if host 2 wants to contact host 1 and does not know where to
forward the traffic for any network that is not connected to them...
Host2> enable
Host2# conf t
Host2(config)# ip route 0.0.0.0 0.0.0.0 10.1.2.254
**To confirm this: Host1> show ip route or Host2> show ip route
ex. See how long ARP cache last (using interface f0/0)
Router> enable
Router# show interface f0/0
Answer: "ARP Timeout 04:00:00" (default for Cisco)
Loopback interface
- 127.0.0.1
- By default, it is active (no need for "no shutdown" command)
- Loopback can be used for telnet... must setup EIGRP
TCP/UDP
- TCP Transmission Control Protocol - 3-way handshake, connection oriented,
reliable, delivery acknowledgement (sequence number), sequenced, HTTP/E-mail/FTP
- UDP User Datagram Protocol - connectionless, best effort/unreliability, no
gurantee of delivery, no sequencing, limited error delivery (if no port #
available, message can be send to sender?), VOIP/Video-Streaming
- Allows for Session Multiplexing - single host with single IP address can
communicate with mutliple device/session
- Connection must first be established between sender and receiver before data
transmission in SEGMENTS
- MTU Maximum Transmission Unit depends on physical medium (ex. MTU of FastEthernet
is 1500bytes, MTU of TCP support 65495 bytes)
- MSS Maximum Segment Size is the maximum segment size that TCP is willing to send
in a single segment, should be set small enough to avoid IP fragmentation which
leads to excessive retransmission if there is packet loss
- TCP supports MSS and Path MTU Discovery (sender and receiver automatically
determine maximum transmission - avoid fragmentation)
- Path MTU Discovery is mandatory in IPv6
- UDP does not support Path MTU Discovery - relies on higher layer protocols
- TCP has Flow Control (sliding window) to avoid data being sent too quickly - data
sent too quickly will be dropped and require retransmission (causes delay), UDP has
no Flow Control
- TCP has session, and once transmission is complete, session is terminated. UDP
has no sessions
- TCP every segment is transmitted is acknowledged
- UDP Header 16bit UDP length: minimum 8 bytes, maximum 65,535 bytes (everything is
16)
TCP Summary
- Connection Oriented
- Full duplex operation
- Error checking (checksum in datagram to confirm this)
- Segments are sequenced
- Acknowledgement of receipt
- Retransmission of data is possible
Application Layer
- File Transfer: FTP File Transfer Protocol, TFTP Trivial File Transfer Protocol,
NFS Network File System
- E-mail: POP3 Post Office Protocol 3 (receive e-mail), SMTP Simple Mail Transfer
Protocol (send e-mail), IMAP Internet Message Access Protocol (receive e-mail)
- Remote Login: Telnet (sends traffic in clear text/insecure), SSH (secure
shell/secure)
- Network Management: SNMP Simple Network Management Protocol
- Name Management: DNS Domain Name System (translate domain names into ip
addresses)
Recap 7 layers
**Physical (1) -> Data Link (2) -> Network (3) -> Transport (4) -> Application (7)
**(RJ45 -> MAC Address -> IP Address -> TCP/UDP -> Port Number)
Socket
- Combination of: IP address of host, port number, TCP/UDP (transport protocol
used)
Port Numbers:
- 7 ping echo
- 20 FTP Data
- 21 FTP
- 22 SSH
- 23 Telne
- 53 DNS TCP/UDP (UDP used to serve request, TCP is used when response data is over
512bytes)
- 69 TFTP
- 80 HTTP
- 115 SFTP
- 161 SNMP
- 443 HTTPS
*Well known port numbers: 0 - 1023
*Registered port numbers: 1024 - 49151
*Dynamic/Private port numbers: 49152 - 65535
*Ephemeral port numbers (short lived port used for client side of connection -
temporary, only last for session) - varies based on vendor
Configure Cisco Router as DHCP Dynamic Host Configuration Protocol and enable DNS:
Router1#configure terminal
Router1(config)#ip domain-lookup
Router1(config)#interface f0/0
Router1(config-if)#ip address dhcp
Router1(config-if)#no shutdown
Router1#show dhcp lease [See DHCP lease]
Router1#show dhcp server [See DHCP server]
If we do not use DHCP server and without DHCP, DNS and gateway does not
automatically populate, we must manually add it:
Router1#configure terminal
Router1(config)#ip name-server 8.8.8.8 [DNS setup]
Router1(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.249 [Gateway of last resort]
Router1(config)#interface f0/0
Router1(config-if)#ip address 192.168.1.1 255.255.255.0
Router1(config-if)#no shutdown
IP helper address:
- a router can be configured to accept a broadcast request for a UDP service and
then forward it as a unicast to a specific IP address
ex. Router needs to reach a DHCP server on 192.168.2.254
Router2(config)#int f0/0
Router2(config-if)#ip helper-address 192.168.2.254
Router2(config-if)#no shutdown
Trucking Protocol
1) ISL Interswitch Link - Cisco Proprietary Protocol (Old)
2) 802.1Q - Industrial Standard
802.1Q
- Has a 4byte "Tag" in the header in addition to the Ethernet header
Native VLANs
- Native VLANs are untagged
4 VTP Modes
**Note, revision number takes presidence (not server, or client)
1) Server (Default mode)
- Create/Modify/Delete VLANs
- Sends and forwards VTP advertisements
- Can save VLAN configuration locally
2) Client
- CANNOT Create/Modify/Delete VLANs
- Sends and forwards VTP advertisements
3) Transparent
- Disables VTP (no synchronization), allows forward VTP advertisements
4) Off
- Disables VTP (no synchronization), not allow to forward VTP advertisements
VLAN versions
- VLAN 1 (Ethernet) = 1 to 1005 are supported, beyond this use "VTP Transparent
Mode"
- VLAN 2 = 1001
VTP Pruning
- **ONLY VTP servers can use it
- VTP allows for automatic pruning and un-pruning of links
- improve proper allocation and bandwidth by reducing unncessary flooded traffic
(broadcast, multicast, etc)
- will only forward on trunk ports
- NEVER pruned VLAN 1, >1002
VTP Password
- By Default, no VTP password configured
- Only switches that have same password will synchronize with each other
===Simulation#1===
- Configure Switch1 as the VTP server and Switch2 as VTP clients
- Set the VTP domain name to cisco
- Set the VTP password to cisco
- Enable VTP pruning so that inter-switch broadcast replication is minimized
Switch1>en
Switch1#conf t
Switch1(config)#vtp mode server
Switch1(config)#vtp domain cisco
Switch1(config)#vtp password cisco
Switch1(config)#vtp pruning
Switch2>en
Switch2#conf t
Switch2(config)#vtp mode client
Switch2(config)#vtp domain cisco
===Simulation#2===
Create the following VLANs on Switch1:
- VLAN 10 with a description "HR"
- VLAN 20 with a description of "Sales"
- Vlan 30 with a description of "Directors"
Switch1> en
Switch1# conf t
Switch1(config)# vlan 10
Switch1(config-vlan)# name HR
Switch1(config-vlan)# vlan 20
Switch1(config-vlan)# name Sales
Switch1(config-vlan)# vlan 30
Switch1(config-vlan)# name Directors
===Simulation#3===
Assume that ports are configured using the default switchport mode of access
Assign interface FastEthernet 0/3 to VLAN 10 on Switch1
Assign interfaces FastEthernet 0/4 through FastEthernet 0/20 to VLAN 20 on Switch1
using the interface range command
Switch1> en
Switch1# conf t
Switch1(config)# interface f0/3
Switch1(config-if)# switchport access vlan 10
Switch1(config-if)# interface range fastethernet 0/4 - 20
Switch1(config-if-range)# switchport access vlan 20
===Simulation#4===
Configure the switch as a VTP transparent
Set the VTP domain to ICND
Switch1> en
Switch1# conf t
Switch1(config)# vtp mode transparent
Setting device to VTP mode transparent
Switch1(config)# vtp domain ICND
Changing VTP domain name from NULL to ICND
===Simulation#5===
Configure Switch1 as a VTP server and Switch2 as a VTP client
Set the VTP domain to gns3.com
Set the VTP password to cisco
Enable VTP pruning
Switch1> en
Switch1# conf t
Switch1(config)# vtp mode server
Device mode already VTP SERVER.
Switch1(config)# vtp domain gns3.com
Changing VTP domain name from NULL to gns3.com
Switch1(config)# vtp password cisco
Setting device VLAN database password to cisco
Switch1(config)# vtp pruning
Switch2> en
Switch2# conf t
Switch2(config)# vtp mode client
Setting device to VTP mode client
Switch2(config)# vtp domain gns3.com
Changing VTP domain name from NULL to gns3.com
Switch2(config)# vtp password cisco
Setting device VLAN database password to cisco
Switch2(config)# vtp pruning