In turn, the commands are as follows:
R 1 (configuration) # interface serial 0
R 1(config-if)#ip address172.16.1.1255.255.0.
R 1 (if configured) clock rate 64000
R 1 (configuration) # interface fastethernet 0
R 1(config-if)#ip address192.168.1.1255.255.0.
R 1 (configuration) # interface fastethernet 1
R 1(config-if)#ip address192.168.1.2 255.255.0
R2 (Configuration) # Interface Serial 0
R2 (configuration -if)#ip address172.16.1.2 255.255.0
R2 (configured if) clock rate 64000
R2 (Configuration) # Interface Fast Ethernet 0
R2 (configuration -if)#ip address192.168.2.1255.255.0
R2 (configuration) # interface fastethernet 1
R2 (configuration -if)#ip address192.168.2.2 255.255.0
In this case, all IP ports are configured, and then all newly configured ports are "not closed" once, because general routers are closed by default.
Now enter the switch configuration port VLAN.
SW 1#vlan database
SW 1 (Virtual LAN) # Virtual LAN 2
SW 1 (Virtual LAN) # Virtual LAN 3
Sw 1 (Configuration) # Internal fa 0
Sw 1 (configuration -if)# Switch port accesses vlan 2.
Sw 1 (Configuration) # Internal fa 1
Sw 1 (configuration -if)# Switch port accesses vlan 3.
All right! ! Switch 1 is well configured, and so is switch 2!
Now configure the IP address of the router:
R 1 (Configuration) # Router rip
R 1 (configure router) # Network192.168.1.0
R2 (Configuration) # Router rip
R2 (configure router) # network 192. 168.2.0
Then configure access control:
R 1 (Configuration) # Access List 1 Deny192.168.2.20.0.0.
R 1 (configuration) # interface fa 0
R 1 (configuration -if)#ip access-group 1 output
R 1 (Configuration) # Access List 1 Allow192.168.2.10.0.0.
R 1 (configuration) # interface fa 0
R 1 (configuration -if)#ip access-group 1 output
Ok, the whole configuration is complete. Pull, big brother, you really tired me out. You, I spent hours trying to give orders! ! !
Don't give me 200 points, sorry for the audience! ! ! !
My hands are numb.