3. cvičení

Nastavení VLAN, access/trunk portů

1. Vytvoření VLAN


# set vlans <VLAN name> vlan-id <VLAN number> 
# set vlans <VLAN name> description <text info>

2. Nastavení módu rozhraní access/trunk


# set interfaces <interface name> unit 0 family ethernet-switching interface-mode <access/trunk>

3. Nastavení VLAN na rozhraní


# set interfaces <interface name> unit 0 family ethernet-switching vlan members <VLAN ID>

4. Vypnutí linky mezi Juniper 2 a Juniper 3 (tvořila by smyčku) a také ge-0/0/


# set interfaces ge-0/0/0 disable
# set interfaces ge-0/0/1 disable

5. Commit a restart pro změnu typu rozhraní


# commit and-quit 
> request system reboot

6. Výpis informací o VLAN a transparent bridge módu


> show interfaces terse 
> show vlans
> show vlans sort-by-tag 
> show ethernet-switching global-information

7. Zobrazení CAM tabulky


> show ethernet-switching table brief

Nastavení L3 rozhraní pro VLAN

1. Vytvoření L3 rozhraní

# set interfaces irb unit <number> family inet address <IP address>/<prefixlength>

2. Přidání L3 rozhraní k VLAN

# set vlans <VLAN name> l3-interface irb.<number>

3. Nastavení IP adresy na počítače

4. Ověření komunikace v rámci sítě

Nastavení VRRP

1. Nastavení sdílené virtuální adresy a použití IP pro data


# edit interfaces irb unit <number> family inet address <IPaddress>/<prefix length>

[edit interfaces irb unit <number> family inet address <IP address>/<prefix length>]
# set vrrp-group <VRRP group number> virtual-address <virtual IP>

[edit interfaces irb unit <number> family inet address <IP address>/<prefix length>] 
# set vrrp-group <VRRP group number> accept-data

2. Nastavení priority


[edit interfaces irb unit <number> family inet address <IP address>/<prefixlength>]
# set vrrp-group <VRRP group number> priority <priority>

[edit interfaces irb unit <number> family inet address <IP address>/<prefixlength>]
# top

[edit] 
# commit and-quit

3. Ověření nastavení VRRP


> show vrrp 
> show interfaces terse
> show route

4. Ověření komunikace mezi PC

5. Vyzkoušejte vypnout rozhraní ge-0/0/2 u Juniper 2 nebo Juniper 3 - dojde k přesunu aktivní GW na druhý


# set interface ge-0/0/2 disable 
# commit and-quit
> show vrrp

Nastavení LLDP

1. Zapnutí LLDP na všech rozhraních


# set protocols lldp interface all 
# commit and-quit

2. Výpis sousedních rozhraní


> show lldp neighbors