# KT projektas 103 – Packet Tracer commands ## 0. Module slots (Router-PT-Empty) Turn the router off, add the modules, then turn it back on. On Router-PT, slot N becomes `GigabitEthernetN/0`. The commands below only work if you use this slot order: | Router | Slot 0 | Slot 1 | Slot 2 | Slot 3 | |---|---|---|---|---| | Rute | 1FGE → Rvyz | 1FGE → Rkuk | 1FGE → Rsud | 1CGE → S-ute | | Rvyz | 1FGE → Rute | 1CGE → K1-vyz-v | 1CGE → K1-vyz-a | | | Rkuk | 1FGE → Rute | 1FGE → Rsal | 1CGE → K1-kuk-v | | | Rsal | 1FGE → Rkuk | 1CGE → K1-sal-v | | | | Rsud | 1FGE → Rute | 1FGE → Rdau | 1CGE → K1-vlan-sud Gi0/1 | | | Rdau | 1FGE → Rsud | 1CGE → K1-dau-v | 1CGE → K1-dau-a | | On each router, open the CLI and type `enable` and `configure terminal` first. Paste the block, then type `end` and `write memory`. ## 1. Routers ### Rute ``` hostname Rute interface Gi0/0 ip address 10.10.1.193 255.255.255.252 no shutdown interface Gi1/0 ip address 10.10.1.197 255.255.255.252 no shutdown interface Gi2/0 ip address 10.10.1.205 255.255.255.252 no shutdown interface Gi3/0 ip address 111.111.4.154 255.255.255.252 no shutdown exit ip route 222.222.50.0 255.255.255.192 10.10.1.198 ip route 222.222.50.64 255.255.255.224 10.10.1.198 ip route 10.10.1.200 255.255.255.252 10.10.1.198 ip route 222.222.50.144 255.255.255.240 10.10.1.194 ip route 111.111.4.144 255.255.255.248 10.10.1.194 ip route 222.222.50.96 255.255.255.224 10.10.1.206 ip route 222.222.50.128 255.255.255.240 10.10.1.206 ip route 111.111.4.128 255.255.255.248 10.10.1.206 ip route 111.111.4.136 255.255.255.248 10.10.1.206 ip route 10.10.1.208 255.255.255.252 10.10.1.206 ``` ### Rvyz ``` hostname Rvyz interface Gi0/0 ip address 10.10.1.194 255.255.255.252 no shutdown interface Gi1/0 ip address 222.222.50.158 255.255.255.240 no shutdown interface Gi2/0 ip address 111.111.4.150 255.255.255.248 no shutdown exit ip route 222.222.50.0 255.255.255.192 10.10.1.193 ip route 222.222.50.64 255.255.255.224 10.10.1.193 ip route 222.222.50.96 255.255.255.224 10.10.1.193 ip route 222.222.50.128 255.255.255.240 10.10.1.193 ip route 111.111.4.128 255.255.255.248 10.10.1.193 ip route 111.111.4.136 255.255.255.248 10.10.1.193 ip route 111.111.4.152 255.255.255.252 10.10.1.193 ip route 10.10.1.196 255.255.255.252 10.10.1.193 ip route 10.10.1.200 255.255.255.252 10.10.1.193 ip route 10.10.1.204 255.255.255.252 10.10.1.193 ip route 10.10.1.208 255.255.255.252 10.10.1.193 ``` ### Rkuk ``` hostname Rkuk interface Gi0/0 ip address 10.10.1.198 255.255.255.252 no shutdown interface Gi1/0 ip address 10.10.1.201 255.255.255.252 no shutdown interface Gi2/0 ip address 222.222.50.62 255.255.255.192 no shutdown exit ip route 222.222.50.64 255.255.255.224 10.10.1.202 ip route 222.222.50.96 255.255.255.224 10.10.1.197 ip route 222.222.50.128 255.255.255.240 10.10.1.197 ip route 222.222.50.144 255.255.255.240 10.10.1.197 ip route 111.111.4.128 255.255.255.248 10.10.1.197 ip route 111.111.4.136 255.255.255.248 10.10.1.197 ip route 111.111.4.144 255.255.255.248 10.10.1.197 ip route 111.111.4.152 255.255.255.252 10.10.1.197 ip route 10.10.1.192 255.255.255.252 10.10.1.197 ip route 10.10.1.204 255.255.255.252 10.10.1.197 ip route 10.10.1.208 255.255.255.252 10.10.1.197 ``` ### Rsal ``` hostname Rsal interface Gi0/0 ip address 10.10.1.202 255.255.255.252 no shutdown interface Gi1/0 ip address 222.222.50.94 255.255.255.224 no shutdown exit ip route 222.222.50.0 255.255.255.192 10.10.1.201 ip route 222.222.50.96 255.255.255.224 10.10.1.201 ip route 222.222.50.128 255.255.255.240 10.10.1.201 ip route 222.222.50.144 255.255.255.240 10.10.1.201 ip route 111.111.4.128 255.255.255.248 10.10.1.201 ip route 111.111.4.136 255.255.255.248 10.10.1.201 ip route 111.111.4.144 255.255.255.248 10.10.1.201 ip route 111.111.4.152 255.255.255.252 10.10.1.201 ip route 10.10.1.192 255.255.255.252 10.10.1.201 ip route 10.10.1.196 255.255.255.252 10.10.1.201 ip route 10.10.1.204 255.255.255.252 10.10.1.201 ip route 10.10.1.208 255.255.255.252 10.10.1.201 ``` ### Rsud (VLAN subinterfaces) ``` hostname Rsud interface Gi0/0 ip address 10.10.1.206 255.255.255.252 no shutdown interface Gi1/0 ip address 10.10.1.209 255.255.255.252 no shutdown interface Gi2/0 no ip address no shutdown interface Gi2/0.10 encapsulation dot1Q 10 ip address 222.222.50.142 255.255.255.240 interface Gi2/0.20 encapsulation dot1Q 20 ip address 111.111.4.134 255.255.255.248 exit ip route 222.222.50.96 255.255.255.224 10.10.1.210 ip route 111.111.4.136 255.255.255.248 10.10.1.210 ip route 222.222.50.0 255.255.255.192 10.10.1.205 ip route 222.222.50.64 255.255.255.224 10.10.1.205 ip route 222.222.50.144 255.255.255.240 10.10.1.205 ip route 111.111.4.144 255.255.255.248 10.10.1.205 ip route 111.111.4.152 255.255.255.252 10.10.1.205 ip route 10.10.1.192 255.255.255.252 10.10.1.205 ip route 10.10.1.196 255.255.255.252 10.10.1.205 ip route 10.10.1.200 255.255.255.252 10.10.1.205 ``` ### Rdau ``` hostname Rdau interface Gi0/0 ip address 10.10.1.210 255.255.255.252 no shutdown interface Gi1/0 ip address 222.222.50.126 255.255.255.224 no shutdown interface Gi2/0 ip address 111.111.4.142 255.255.255.248 no shutdown exit ip route 222.222.50.0 255.255.255.192 10.10.1.209 ip route 222.222.50.64 255.255.255.224 10.10.1.209 ip route 222.222.50.128 255.255.255.240 10.10.1.209 ip route 222.222.50.144 255.255.255.240 10.10.1.209 ip route 111.111.4.128 255.255.255.248 10.10.1.209 ip route 111.111.4.144 255.255.255.248 10.10.1.209 ip route 111.111.4.152 255.255.255.252 10.10.1.209 ip route 10.10.1.192 255.255.255.252 10.10.1.209 ip route 10.10.1.196 255.255.255.252 10.10.1.209 ip route 10.10.1.200 255.255.255.252 10.10.1.209 ip route 10.10.1.204 255.255.255.252 10.10.1.209 ``` ## 2. Switches ### K1-vlan-sud (the only switch that needs commands) ``` enable configure terminal hostname K1-vlan-sud vlan 10 name v vlan 20 name a exit interface range fa0/1 - 12 switchport mode access switchport access vlan 10 interface range fa0/13 - 16 switchport mode access switchport access vlan 20 interface gi0/1 switchport mode trunk end write memory ``` The other 8 switches need no commands, only correct cables. Kuktiškės: K1 Gi0/1 → Rkuk, K1 Gi0/2 → K2 Gi0/1, K2 Gi0/2 → K3 Gi0/1 (Cross-Over between switches). ## 3. PCs and servers (Desktop → IP Configuration) | Device | IP | Mask | Gateway | |---|---|---|---| | S-ute | 111.111.4.153 | 255.255.255.252 | 111.111.4.154 | | C1v-vyz | 222.222.50.145 | 255.255.255.240 | 222.222.50.158 | | C10v-vyz | 222.222.50.154 | 255.255.255.240 | 222.222.50.158 | | C1a-vyz | 111.111.4.145 | 255.255.255.248 | 111.111.4.150 | | C2a-vyz | 111.111.4.146 | 255.255.255.248 | 111.111.4.150 | | S-vyz | 111.111.4.147 | 255.255.255.248 | 111.111.4.150 | | C1v-kuk | 222.222.50.1 | 255.255.255.192 | 222.222.50.62 | | C32v-kuk | 222.222.50.32 | 255.255.255.192 | 222.222.50.62 | | C33v-kuk | 222.222.50.33 | 255.255.255.192 | 222.222.50.62 | | C44v-kuk | 222.222.50.44 | 255.255.255.192 | 222.222.50.62 | | C1v-sal | 222.222.50.65 | 255.255.255.224 | 222.222.50.94 | | C20v-sal | 222.222.50.84 | 255.255.255.224 | 222.222.50.94 | | C1v-sud | 222.222.50.129 | 255.255.255.240 | 222.222.50.142 | | C12v-sud | 222.222.50.140 | 255.255.255.240 | 222.222.50.142 | | C1a-sud | 111.111.4.129 | 255.255.255.248 | 111.111.4.134 | | C3a-sud | 111.111.4.131 | 255.255.255.248 | 111.111.4.134 | | S-sud | 111.111.4.132 | 255.255.255.248 | 111.111.4.134 | | C1v-dau | 222.222.50.97 | 255.255.255.224 | 222.222.50.126 | | C20v-dau | 222.222.50.116 | 255.255.255.224 | 222.222.50.126 | | C1a-dau | 111.111.4.137 | 255.255.255.248 | 111.111.4.142 | | C3a-dau | 111.111.4.139 | 255.255.255.248 | 111.111.4.142 | | S-dau | 111.111.4.140 | 255.255.255.248 | 111.111.4.142 | On **S-ute**, go to Services → HTTP: make sure it is On and edit `index.html` to add your name, surname, the scheme and the configuration. ## 4. ACL on Rute (add only after every ping works) ``` enable configure terminal access-list 100 permit icmp any host 111.111.4.153 access-list 100 permit tcp 111.111.4.144 0.0.0.7 host 111.111.4.153 eq 80 access-list 100 permit tcp 111.111.4.128 0.0.0.7 host 111.111.4.153 eq 80 access-list 100 permit tcp 111.111.4.136 0.0.0.7 host 111.111.4.153 eq 80 access-list 101 permit icmp host 111.111.4.153 any access-list 101 permit tcp host 111.111.4.153 eq 80 111.111.4.144 0.0.0.7 access-list 101 permit tcp host 111.111.4.153 eq 80 111.111.4.128 0.0.0.7 access-list 101 permit tcp host 111.111.4.153 eq 80 111.111.4.136 0.0.0.7 interface Gi3/0 ip access-group 100 out ip access-group 101 in end write memory ``` Everything else is blocked automatically, because every ACL ends with a hidden "deny all" rule. ## 5. How to test - `show ip interface brief`: every interface should be up/up. - Ping from every PC to S-ute (111.111.4.153), and from C1v-sal to C1a-dau, which crosses the whole network. - `tracert 111.111.4.137` from C1v-sal should go Rsal → Rkuk → Rute → Rsud → Rdau. - After adding the ACL, open a browser to `111.111.4.153`. It should work from C1a-vyz, C1a-sud and C1a-dau, and fail from any "v" PC. Ping should still work from all PCs. If your interface numbers come out different (for example, Router-PT instead of Router-PT-Empty already has built-in FastEthernet ports), check them with `show ip interface brief` and change the `GiX/0` names to match.