5. cvičení

Základní nastavení

1. Získání IPv4 adresy z DHCP (DHCP client)


# set interfaces ge-0/0/<x> unit 0 family inet dhcp

2. Získání IPv6 adresy z DHCP (DHCP client)


# set interfaces ge-0/0/0 unit 0 family inet6 dhcpv6-client client-type stateful
# set interfaces ge-0/0/0 unit 0 family inet6 dhcpv6-client client-ia-type ia-na
# set interfaces ge-0/0/0 unit 0 family inet6 dhcpv6-client client identifier duid-type duid-ll

3. Nastavení IPv6 adresy


# set interfaces ge-0/0/<x> unit 0 family inet6 address <IPv6addres>/<prefix length>

4. Nastavení módu přepínaní pro IPv6


# set security forwarding-options family inet6 mode packet-based

5. Nastavení statické IPv6 default route


# set routing-options rib inet6.0 static route ::/0 next-hop 2001::

6. Kontrola aplikace nastavení - adresy, route, mód přepínaní paketů


> show interfaces terse 
> show route
> show security flow status

Nastavení DHCP serveru

1. Nastavení DHCP pool


# set access address-assignment pool <pool name> family inet network <IPnetwork addres>/<prefix length>

# set access address-assignment pool <pool name> family inet range <rangename> low <low IP address of range> high <high IP address of range>

# set access address-assignment pool <pool name> family inet dhcp-attributes name-server <DNS server address>

# set access address-assignment pool <pool name> family inet dhcp-attributes router <default gateway IP>

# set access address-assignment pool <pool name> family inet dhcp-attributes domain-name <domain suffix>

# set access address-assignment pool <pool name> family inet dhcp-attributes maximum-lease-time <lease length>

2. Přiřazení DHCP pool k rozhraní


# set system services dhcp-local-server group <pool name> interface<interface name>
# commit

3. Nastavení router advertisment pro rozhraní


# set protocols router-advertisement interface <interface name> managed-configuration

4. Nastavení DHCP pool pro IPv6


# set access address-assignment pool <pool name> family inet6 prefix <IPv6network addres>/<prefix length>

# set access address-assignment pool <pool name> family inet6 range <nameof range> low <low IPv6 address of range>

# set access address-assignment pool <pool name> family inet6 range <nameof range> high <high IPv6 address of range>

# set access address-assignment pool <pool name> family inet6 dhcp-attributes dns-server <DNS server address>

# set system services dhcp-local-server dhcpv6 group <pool name> interface
<interface name>

5. Alternativně je možné místo DHCPv6 serveru zapnout autonomní získávání IPv6 adresy


# set protocols router-advertisement interface ge-0/0/0 prefix <IPv6network addres>/<prefix length> autonomous

6. Test získání adresy na PC

7. Kontrola přidělených adres


> show dhcp server binding 
> show dhcpv6 server binding

Záloha konfigurace na FTP

1. Odeslání aktuální konfigurace při commit


# set system archival configuration archive-sites ftp://<username>@<ftp IPaddress>/ password <password>
# set system archival configuration transfer-on-commit

2. Ověřit na FTP serveru (přesun konfigu proběhne cca 30 sekund po commit)

SNMP

1. Nastavení SNMP


# set snmp community <community name> clients <allowed IP range> 
# set snmp trap-group interfaces targets <IP address for SNMP trap>
# set snmp trap-group interfaces categories link 
# commit

2. Odchyt SNMP na PC

3. Test nastavení


# set interfaces ge-0/0/1 disable 
# commit and-quit
> show interfaces ge-0/0/1 terse
> show log messages | match ge-0/0/1 | match snmp 
> show snmp statistics
> show snmp mib walk jnxOperatingDescr

4. Další nastavení


# set system location LAB 
# commit and-quit
> show chassis location

Syslog

1. Ukládání syslog zpráv do souborů


# set system syslog file <filename> <facility> <severity> 
# set system syslog file soubor authorization info

2. Zobrazení obsahu log souborů


> file list /var/log/ 
> show log soubor
> clear log ... 
> file delete ...

3. Nastavení odesílání syslog zpráv


# set system syslog host <IP of syslog server> <facility> <severity> 
# commit and-quit

4. Odchyt Syslog na PC

NTP

1. Nastavení NTP serveru


# set system ntp server <NTP server IP address> 
# commit and-quit

2. Ověření synchronizace


> set date ntp
> show ntp associations

Odchyt komunikace

1. Odchyt komunikace - jen komunikace systémová mířící na dané rozhraní (ARP, DHCP,…)


> monitor traffic interface <interface>