Vlany, komunikacja między routerami

Problemy związane ze switchingiem
Wiadomość
Autor
placebo89
member
member
Posty: 25
Rejestracja: 13 mar 2012, 10:11

Vlany, komunikacja między routerami

#1

#1 Post autor: placebo89 »

Witam. Mam taką topologię:

Obrazek

na switchach skonfigurowałem vlany, między nimi połączenia trunk. Pomiędzy S1 a R1 skonfigurowałem łącze trunk. Do tej pory wszystko działa, komputery z różnych vlanów pingują się. (Mam 3 vlany: 5,6 i 10). Komputer PC2 należy do 6, a PC1 do 5.

Na routerze R3 chciałem uruchomić serwer HTTP, do którego mógłbym się dostać np. z komputera PC2. Jednak mam problem z adresacją.

Jakie adresy mogę przypisać między R2 a R3, żeby mógł się do niego dostać PC1 bądź PC2? Na interfejsie R2 do switcha też muszę podać jakiś adres? (skonfigurowałem go jako trunk) Na R1 myślałem, żeby skonfigurować domyślną trasę statyczną do R3.

Próbowałem do poł. między routerami R2 i R3 przypisać adresy z vlanu 10, ale dostaję komunikat:

Kod: Zaznacz cały

R2(config)#interface serial 2/0
R2(config-if)#ip address 192.168.10.4 255.255.255.0
% 192.168.10.0 overlaps with FastEthernet0/0.10
konfiguracja R2:

Kod: Zaznacz cały

R2#sh running-config 
Building configuration...

Current configuration : 978 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.5
 encapsulation dot1Q 5
 ip address 192.168.5.1 255.255.255.0
!
interface FastEthernet0/0.6
 encapsulation dot1Q 6
 ip address 192.168.6.1 255.255.255.0
!
interface FastEthernet0/0.9
 encapsulation dot1Q 9
 ip address 192.168.9.1 255.255.255.0
!
interface FastEthernet0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0
!
interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
!
interface Serial2/0
 no ip address
 clock rate 64000
!
interface Serial3/0
 no ip address
 clock rate 2000000
 shutdown
!
interface FastEthernet4/0
 no ip address
 shutdown
!
interface FastEthernet5/0
 no ip address
 shutdown
!
ip classless
!
!
!
!
!
!
!
line con 0
line vty 0 4
 login
!
!
!
end
Jak to rozwiązać, zrobić poprawnie? A może między routerami zupełnie inną sieć dać? Tylko jak wtedy komputer "znajdzie" R3 - za pomocą trasy domyślnej na R1? Dziękuję za odpowiedzi ;)

Awatar użytkownika
art
wannabe
wannabe
Posty: 416
Rejestracja: 04 lip 2011, 10:25

#2

#2 Post autor: art »

Pomiędzy R2 a R3 daj 172.16.1.0/24 skonfiguruj trasy statyczne i będzie działać.

placebo89
member
member
Posty: 25
Rejestracja: 13 mar 2012, 10:11

#3

#3 Post autor: placebo89 »

Ok, dałem taką sieć pomiędzy routerami, ale teraz nie do końca jestem pewien, jak wpisać te trasy statyczne. Bo wtedy muszę przecież na R2 na Fa0/0 też przydzielić jakiś adres? Ogólnie to chciałem na R1 dać trasę domyślną (żeby ruch z vlanów, który R1 "nie wie" gdzie kierować, kierował na R2, ale nie wiem, czy dobrze myślę...):

ip route 0.0.0.0 0.0.0.0 ?

ale nie wiem, przez jaki interfejs miałaby ona dochodzić do R2/R3?
Jesteś ze Szczecina? Napisz, chętnie pogadam, nie tylko o sieciach;)

placebo89
member
member
Posty: 25
Rejestracja: 13 mar 2012, 10:11

#4

#4 Post autor: placebo89 »

Męczę się nadal z tą topologią. Przerobiłem ją od nowa. Między S1 a R2 NIE MA JUŻ ŁĄCZA TRUNK. Do interfejsu routera R2 do poł. ze switchem przypisałem adres z vlanu 10. Dodałem trasy statyczne, mimo to, ping z PC1/PC0 do R3 nie działa.

**SWITCH S1:**

Kod: Zaznacz cały

Current configuration : 942 bytes
    !
    version 12.1
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname S1
    !
    !
    spanning-tree mode pvst
    !
    interface FastEthernet0/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet1/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet2/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet3/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet4/1
    !
    interface FastEthernet5/1
    !
    interface FastEthernet6/1
     switchport access vlan 10
     switchport mode access
    !
    interface FastEthernet7/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet8/1
    !
    interface FastEthernet9/1
     switchport trunk native vlan 99
     switchport mode trunk
    !
    interface Vlan1
     no ip address
     shutdown
    !
    !
    line con 0
    !
    line vty 0 4
     login
    line vty 5 15
     login
    !
    !
    end
**SWITCH S2:**

Kod: Zaznacz cały

Current configuration : 830 bytes
    !
    version 12.1
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname S2
    !
    !
    spanning-tree mode pvst
    !
    interface FastEthernet0/1
    !
    interface FastEthernet1/1
    !
    interface FastEthernet2/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet3/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet4/1
    !
    interface FastEthernet5/1
    !
    interface FastEthernet6/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet7/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet8/1
     switchport access vlan 6
     switchport mode access
    !
    interface FastEthernet9/1
    !
    interface Vlan1
     no ip address
     shutdown
    !
    !
    line con 0
    !
    line vty 0 4
     login
    line vty 5 15
     login
    !
    !
    end
**SWITCH S3:**

Kod: Zaznacz cały

Current configuration : 830 bytes
    !
    version 12.1
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname S3
    !
    !
    spanning-tree mode pvst
    !
    interface FastEthernet0/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet1/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet2/1
    !
    interface FastEthernet3/1
    !
    interface FastEthernet4/1
    !
    interface FastEthernet5/1
    !
    interface FastEthernet6/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet7/1
     switchport trunk native vlan 9
     switchport mode trunk
    !
    interface FastEthernet8/1
     switchport access vlan 5
     switchport mode access
    !
    interface FastEthernet9/1
    !
    interface Vlan1
     no ip address
     shutdown
    !
    !
    line con 0
    !
    line vty 0 4
     login
    line vty 5 15
     login
    !
    !
    end
**ROUTER R1** :

Kod: Zaznacz cały

 Current configuration : 1039 bytes
    !
    version 12.2
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname R1
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface FastEthernet0/0
     no ip address
     duplex auto
     speed auto
    !
    interface FastEthernet0/0.5
     encapsulation dot1Q 5
     ip address 192.168.5.1 255.255.255.0
    !
    interface FastEthernet0/0.6
     encapsulation dot1Q 6
     ip address 192.168.6.1 255.255.255.0
    !
    interface FastEthernet0/0.9
     encapsulation dot1Q 9
     ip address 192.168.9.1 255.255.255.0
    !
    interface FastEthernet0/0.10
     encapsulation dot1Q 10
     ip address 192.168.10.1 255.255.255.0
    !
    interface FastEthernet1/0
     no ip address
     duplex auto
     speed auto
     shutdown
    !
    interface Serial2/0
     no ip address
     clock rate 2000000
     shutdown
    !
    interface Serial3/0
     no ip address
     clock rate 2000000
     shutdown
    !
    interface FastEthernet4/0
     no ip address
     shutdown
    !
    interface FastEthernet5/0
     no ip address
     shutdown
    !
    ip classless
    ip route 0.0.0.0 0.0.0.0 192.168.10.2 
    !
    !
    !
    !
    !
    !
    !
    line con 0
    line vty 0 4
     login
    !
    !
    !
    end
**ROUTER R2** :

Kod: Zaznacz cały

 Current configuration : 649 bytes
    !
    version 12.2
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname R2
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface FastEthernet0/0
     ip address 192.168.10.2 255.255.255.0
     duplex auto
     speed auto
    !
    interface FastEthernet1/0
     no ip address
     duplex auto
     speed auto
     shutdown
    !
    interface Serial2/0
     ip address 172.16.1.2 255.255.255.0
    !
    interface Serial3/0
     no ip address
     clock rate 2000000
     shutdown
    !
    interface FastEthernet4/0
     no ip address
     shutdown
    !
    interface FastEthernet5/0
     no ip address
     shutdown
    !
    ip classless
    !
    !
    !
    !
    !
    !
    !
    line con 0
    line vty 0 4
     login
    !
    !
    !
    end
**ROUTER R3** :

Kod: Zaznacz cały

Current configuration : 690 bytes
    !
    version 12.2
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname R3
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface FastEthernet0/0
     no ip address
     duplex auto
     speed auto
     shutdown
    !
    interface FastEthernet1/0
     no ip address
     duplex auto
     speed auto
     shutdown
    !
    interface Serial2/0
     ip address 172.16.1.1 255.255.255.0
     clock rate 64000
    !
    interface Serial3/0
     no ip address
     clock rate 2000000
     shutdown
    !
    interface FastEthernet4/0
     no ip address
     shutdown
    !
    interface FastEthernet5/0
     no ip address
     shutdown
    !
    ip classless
    ip route 0.0.0.0 0.0.0.0 172.16.1.2 
    !
    !
    !
    !
    !
    !
    !
    line con 0
    line vty 0 4
     login
    !
    !
    !
    end
**ROUTIG TABLES, R1:**

Kod: Zaznacz cały

R1#sh ip route 
    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
           E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
           i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
           * - candidate default, U - per-user static route, o - ODR
           P - periodic downloaded static route
    
    Gateway of last resort is 192.168.10.2 to network 0.0.0.0
    
    C    192.168.5.0/24 is directly connected, FastEthernet0/0.5
    C    192.168.6.0/24 is directly connected, FastEthernet0/0.6
    C    192.168.9.0/24 is directly connected, FastEthernet0/0.9
    C    192.168.10.0/24 is directly connected, FastEthernet0/0.10
    S*   0.0.0.0/0 [1/0] via 192.168.10.2
**ROUTIG TABLES, R2:**

Kod: Zaznacz cały

R2#sh ip ro
    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
           E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
           i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
           * - candidate default, U - per-user static route, o - ODR
           P - periodic downloaded static route
    
    Gateway of last resort is not set
    
         172.16.0.0/24 is subnetted, 1 subnets
    C       172.16.1.0 is directly connected, Serial2/0
    C    192.168.10.0/24 is directly connected, FastEthernet0/0

**ROUTIG TABLES, R3:**

Kod: Zaznacz cały

R3#sh ip route 
    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
           E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
           i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
           * - candidate default, U - per-user static route, o - ODR
           P - periodic downloaded static route
    
    Gateway of last resort is 172.16.1.2 to network 0.0.0.0
    
         172.16.0.0/24 is subnetted, 1 subnets
    C       172.16.1.0 is directly connected, Serial2/0
    S*   0.0.0.0/0 [1/0] via 172.16.1.2
jeśli ktoś byłby tak miły i zerknął, tu jest mój plik z PacketTracera: http://download.hellshare.pl/vlany-pkt/10965228/ :)
Jesteś ze Szczecina? Napisz, chętnie pogadam, nie tylko o sieciach;)

Awatar użytkownika
art
wannabe
wannabe
Posty: 416
Rejestracja: 04 lip 2011, 10:25

#5

#5 Post autor: art »

podpowiem: trasy

placebo89
member
member
Posty: 25
Rejestracja: 13 mar 2012, 10:11

#6

#6 Post autor: placebo89 »

Hm, dodałem jedynie do R2 trasę statyczną:

Kod: Zaznacz cały

ip route 0.0.0.0 0.0.0.0 192.168.10.1
i wszystko działa.

Więc tylko o to chodziło? Nie muszę mieć trunk pomiędzy R2 a S1? I dziekuję za podpowiedzi :)
Jesteś ze Szczecina? Napisz, chętnie pogadam, nie tylko o sieciach;)

JulietCharlie
wannabe
wannabe
Posty: 195
Rejestracja: 06 lut 2012, 01:31

#7

#7 Post autor: JulietCharlie »

a teraz przetestuj z dowolnego PC
traceroute/tracert 1.1.1.1 :wink:
Shoot for the moon.
Even if you miss it you will land among the stars.

ODPOWIEDZ