HDLC configuration
RA---------RB
Configuration on RA:
int s0/0
ip add 192.168.0.1 255.255.255.0 //Configure port IP address
clock rate 1000000 //DEC port, need to configure the clock
encapsulation hdlc //encapsulation HDLC protocol
no shutdown
Configuration on RB:
int s0/0
ip add 192.168.0.2 255.255.255.0
encapsulation hdlc // Both ends must have the same protocol
no shutdown
PPP configuration:
OSPF single area configuration:
router ospf 20
network + network address + subnet mask + area + area number//declare the network to the area
OSPF multi-area configuration:
area area-id stub //Stub area configuration, stub area configuration
area + area-id +stub //Configure this area as a Stub area
area area-id stub no-summary //Totally Stub area configuration
area + area-id +stub no-summary //Configure this area as a Stub area
show ip ospf database //View the OSPF link state database,
show ip ospf database router //Display the type 1 LSA information in the OSPF link state database
show ip ospf database network //Display the type 2 LSA information in the OSPF link state database
show ip ospf database summary //Display the type 3 LSA information in the OSPF link state database
show ip ospf database asbr-summary //Display the type 4 LSA information in the OSPF link state database
show ip ospf database external //Display the type 5 LSA information in the OSPF link state database
show ip ospf database nssa-external //Display the type 7 LSA information in the OSPF link state database
Note: Stub and completely stub areas need to meet the following conditions
1. There is only one exit in the area
2. The area does not need to be used as the transition area of the virtual link
3. No ASBR in the area
4. The area is not the backbone area area0
OSPF advanced configuration:
OSPF has the following two types of route summarization
1. ABR summary ------- inter-area route summary, usually configured on an ABR
area area-id range ip-address mask [advertise|not-advertise][cost cost]
2. ASBR summary
External route summary, usually configured on an ASBR
summary-address ip-address mask [not-adcertise]
redistribute protcol //routing redistribution
redistribute connected subnets //Redistribute the network segment of the direct connection interface
router ospf 1
redistribute static subnets //Static routes are redistributed to OSPF
redistribute rip subnets // static route redistribution to OSPF
defult-information originate //OSPF default route delivery
Set router interface link state cost value
ip ospf cost + value//value range 1~65535
ip ospf priority number-value //Set the router interface priority, the value range is 0~255, the default is 1, the larger the better, you can specify the router for DR/BDP router election
ip ospf hello-interval +seconds (seconds) //Specify the interval for sending Hello packets on the OSPF interface, the value range is 1~65535, and the default is 10s
ip ospf dead-interval +seconds //value range 1~65535, default 40s, 4 times of hello
ip ospf authentication //enable text authentication
ip ospf authentication-key +keky(password) //Set the password for OSPF text authentication between routers
Set an interface MD5 authentication, password hngy
ip ospf message-digest-key 1 md5 hngy
ip ospf authentication message-digest //Specify interface authentication type
ip ospf hello-interval 15 //Set the hello interval to 15 seconds
ip ospf dead-interval 20 //Set the dead time to 20 seconds----An error occurs, and the dead time is required to be four times that of the hello packet
OSPF authentication configuration
1. Text Authentication
Scenario: Two routers RA and RB
RA:RA(config)#int s0/3/0
RA(config-if)#ip ospf authentication-key 12345
RA(config)#router ospf 1
RA(config-router)#area 0 authentication
Consistent configuration on RB
2. md5 authentication
RA:RA(config)#int s0/3/0
RA(config-if)#ip ospf message-digest-key 1 md5 1234
RA(config)#router ospf 1
RA(config-router)#area 0 authentication message-digest
Consistent on RB
--------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------
LAN switching technology:
config terminal //Enter the global configuration mode
enable password + password //configure enable password
enable secret + password//configure secret password
Setting Console Port and Telnet Login Parameters
line con 0
password + password//Set the console port login password
login //save
line vty 0 4 //Set virtual terminal line 0~4
password + password//Set the login password of Telnet
login //save
speed + number//configure port speed
duplex +auto/full/half //Set working mode----auto, full duplex, half half duplex
no switchport //turn the physical interface into a Layer 3 port
show ip interface brief //View brief information about port IP settings
show ip interface status //View port status
switchport mode access/trunk //Set port mode
switchport port-security //Set port security
switchport port-security max +number//Set the maximum number of connections of the port (1~128) default 128
switchport port-security mac-address +mac address//Set the MAC address for port access
switchport port-security mac-address sticky //Set MAC address sticky, the switch will automatically learn the MAC address of the network device connected to the port, and record it in the current configuration file
swit port-security violation +protect/shutdown/restrict //Set the processing method when the switch port receives illegal data frames
SSH login configuration:
username + name password + password // configure login user name and password
aaa new-model //Enable AAA authentication
aaa authentication login ssh local
login authentication ssh //Configure the authentication method
transport input ssh
transport output ssh //Configure login via ssh
ip domain-name + name//create a domain name
crypto key generate rsa //Generate RSA key
wave:
vlan database //in privileged mode
vlan + number name + valn's name//Create valn and name it
switchport mode trunk
switchport trunk encapsulation dot1.q //Encapsulate 802.1Q protocol
VTP:
vtp mode server/client/transparten //vtp working mode,
vtp domain + name//configure VTP domain name
vtp password + password // configure VTP password
show vtp status //Verify VTP configuration
vtp pruning //Configure vtp pruning
ip routing //Enable the IP routing function of the switch
DHCP configuration:
server dhcp
ip dhcp excluded-address +address//add excluded address, if it is an excluded address segment ------ start address end address
ip dhcp pool +name
network + network address + subnet mask // configure the network address range
default-router + gateway address//configure gateway
dns + address//add dns server address
Configure spanning tree:
spanning-tree vlan+vlan-id,vlan +vlan-id root primary //根网桥
spanning-tree vlan+vlan-id, vlan +vlan-id root secondary //backup root bridge
spanning-tree portfast default //Enable fast spanning tree
Link bundling:
int range + interface range
switchport trunk encapsulation dotlq
switchport mode trunk
channel-group 1 mode on
Configure HSRP:
int +vlan //Enter the valn of the active router to be configured
standby + number ip + virtual gateway address
standby +number priority +number//set priority
standby + number preempt // configuration preemption
standby +number track +interface//track uplink interface