3 Aralık 2016 Cumartesi

Switch Cisco Juniper Huawei

Juniper Router;

R:

set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members ALI
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members MSI

set interfaces vlan unit 100 family inet address 10.10.10.1/24
set interfaces vlan unit 200 family inet address 10.10.11.1/24

or
[
set interfaces ge-0/0/0 vlan-tagging
set interfaces ge-0/0/0 unit 0 vlan-id 100
set interfaces ge-0/0/0 unit 0 family inet address 10.10.10.1/24
set interfaces ge-0/0/0 unit 200 vlan-id 200
set interfaces ge-0/0/0 unit 200 family inet address 10.10.11.1/24

set security zones security-zone LOCAL interfaces ge-0/0/0.0
set security zones security-zone LOCAL interfaces ge-0/0/0.200
]

set security policies from-zone LOCAL to-zone LOCAL policy LOCAL2INT match source-address any
set security policies from-zone LOCAL to-zone LOCAL policy LOCAL2INT match destination-address any
set security policies from-zone LOCAL to-zone LOCAL policy LOCAL2INT match application any
set security policies from-zone LOCAL to-zone LOCAL policy LOCAL2INT then permit

set security zones security-zone LOCAL host-inbound-traffic system-services all
set security zones security-zone LOCAL host-inbound-traffic protocols all
set security zones security-zone LOCAL interfaces vlan.100
set security zones security-zone LOCAL interfaces vlan.200

set vlans ALI vlan-id 200
set vlans ALI l3-interface vlan.200
set vlans MSI vlan-id 100
set vlans MSI l3-interface vlan.100

SW:
set interfaces ge-0/0/6 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/6 unit 0 family ethernet-switching vlan members ALI
set interfaces ge-0/0/6 unit 0 family ethernet-switching vlan members TEST
set interfaces ge-0/1/1 unit 0 family ethernet-switching vlan members TEST2

set interfaces vlan unit 0 family inet address 172.18.22.2/27
set interfaces vlan unit 100 family inet address 10.10.10.2/24
set interfaces vlan unit 200 family inet address 10.10.11.2/24

set vlans ALI vlan-id 200
set vlans ALI l3-interface vlan.200
set vlans TEST vlan-id 100
set vlans TEST l3-interface vlan.100
set vlans TEST2 vlan-id 300
set vlans default l3-interface vlan.0

Cisco:
R:

interface GigabitEthernet1/0/4.323
 encapsulation dot1Q 323
 ip address 192.168.34.66 255.255.255.248

SW:
interface GigabitEthernet1/0/12
 switchport access vlan 323
 switchport mode access
 spanning-tree portfast

and you determine for trunk port between ROUTER to SW

interface GigabitEthernet1/0/13
 switchport trunk allowed vlan 323
 switchport mode trunk


Also you can use Access list ;

interface GigabitEthernet0/9
 switchport access vlan 999
 switchport mode access
 ip access-group ACCESS in
 no keepalive
 spanning-tree portfast

ip access-list extended ACCESS
 permit tcp any any eq 9000
 permit icmp any any


If you want to change native vlan at Juniper

set interfaces ge-0/0/0 unit 0 family ethernet-switching native-vlan-id 10 (This command will now allow the switch to accept untagged frames)

Huawei
!!


<Quidway>system-view[Quidway]sysname Customer_A[Customer_A]
switchimiz için yönetim ayarlarını yapalım. yönetim için  99 vlanını kullanacağız… vlanı 99  u  oluşturalım
[Customer_A]vlan 99
[Customer_A-vlan99]quit 
99 vlan için ip tanımlamalarını yapalım.
[Customer_A]interface Vlanif 99
[Customer_A-Vlanif99]ip address 10.0.0.1 30
[Customer_A-Vlanif99]quit
switchimiz üzerinde yer alan gibabitethernet arayüzlerinen bir tanesini trunk olarak olarak tanımlayalım ve tüm vlan için kullanılabilir yapalım.
[Customer_A]interface GigabitEthernet 0/0/1
[Customer_A-GigabitEthernet0/0/1]undo port default vlan
[Customer_A-GigabitEthernet0/0/1]port link-type trunk
[Customer_A-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Customer_A-GigabitEthernet0/0/1]quit
48 portlu bir switch kullanıyorduk. bu yüzden 48. portu yönetim içinde aktif edelim. diğer portlar için yönetime erişim vermeyeceğiz.
[Customer_A]interface Ethernet 0/0/48
[Customer_A-Ethernet0/0/48]undo port default vlan
[Customer_A-Ethernet0/0/48]port link-type trunk
[Customer_A-Ethernet0/0/48]port trunk allow-pass vlan all
[Customer_A-Ethernet0/0/48]quit
iş ağımızda kullanım için 100 vlanını tercih ettiğimizi varsayarak 100 vlanını oluşturalım.
[Customer_A]vlan 100
[Customer_A-vlan100]quit
switch üzerinde yer alan 0/0/1 ve 0/0/2 ethernet portlarını vlan 100 kullanımı için aktif edelim
[Customer_A]interface Ethernet 0/0/1
[Customer_A-Ethernet0/0/1]port link-type access
[Customer_A-Ethernet0/0/1]port default vlan 100
[Customer_A-Ethernet0/0/1]quit
[Customer_A]interface Ethernet 0/0/2
[Customer_A-Ethernet0/0/2]port link-type access
[Customer_A-Ethernet0/0/2]port default vlan 100
[Customer_A-Ethernet0/0/2]quit
şimdide en temel route imizi yazalım
[Customer_A] ip route-static 0.0.0.0 0 10.0.0.2 
temel konfigürasyon işte bu kadar..
!

huawei switchlerde yönetimsel olarak ayrı bir subnet altında toplanması ve diğer kullanıcı erişimlerinide soyutlayabilmek için kullanılacak en temel yöntemlerden bir tanesi :
erişim için bir vlan belirleyerek bu vlan altına ip bilgisinin girilmesi ve globalde bu ipye ilişkin statik route yazmak şeklinde olacaktır.
yapacağımız işlem kısaca
şeklindedir. cihaz üzerinde erişim için gerekli olarak protokolleri 10 vlanına göre yapılandırmayı unutmamak gerekiyor.
!
sysname CLIGURU-S2
#
vlan batch 6
#
interface Vlanif6
ip address 10.0.6.254 255.255.255.0
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk pvid vlan 6
port trunk allow-pass vlan 2 to 4094
#
ip route-static 0.0.0.0 0.0.0.0 10.0.6.3
#
user-interface con 0
user-interface vty 0 4
#
return
---



Hiç yorum yok:

Yorum Gönder