Closed rossy0213 closed 5 years ago
vyos@vyos:~$ show config interfaces { ethernet eth0 { address 192.168.0.1/24 duplex auto hw-id 9c:a3:ba:30:4a:ce smp_affinity auto speed auto } ethernet eth1 { duplex auto hw-id 9c:a3:ba:30:2f:2a smp_affinity auto speed auto } ethernet eth2 { duplex auto hw-id 9c:a3:ba:30:78:e3 smp_affinity auto speed auto } loopback lo { } } service { ssh { port 22 } } system {
eh2に2001:db8:1000::1/64を割り当て set interfaces ethernet eth2 address 2001:db8:1000::1/64
ここ参考に作業 https://jedipunkz.github.io/blog/2013/09/01/hurricane-electric-vyatta-ipv6/ vyos@vyos# edit interfaces ethernet eth1 [edit interfaces ethernet eth1] vyos@vyos# set ip ip ipv6 [edit interfaces ethernet eth1] vyos@vyos# set ipv6 Possible completions:
address IPv6 address auto-configuration modes disable-forwarding Disable IPv6 forwarding on this interface only dup-addr-detect-transmits Number of NS messages to send while performing DAD ospfv3 IPv6 Open Shortest Path First (OSPFv3) ripng Routing Information Protocol (RIPng) router-advert Configure parameters for sending Router Advertisements (RAs)
[edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert Possible completions: cur-hop-limit Value to be placed in the "Current Hop Limit" field in RAs default-lifetime Value to be placed in "Router Lifetime" field in RAs default-preference Default router preference link-mtu Value of link MTU to place in RAs managed-flag Value for "managed address configuration" flag in RAs max-interval Maximum interval between unsolicited multicast RAs min-interval Minimum interval between unsolicited multicast RAs
[edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert send-advert true [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert cur-hop-limit 64 [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert ma managed-flag max-interval [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert max-interval 10 [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert other-config-flag true [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert de default-lifetime default-preference [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert default-preference high [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert an
Configuration path: ipv6 router-advert [an] is not valid
[edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert managed-flag true [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert prefix 2001:db8:2000::/64 [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert prefix 2001:db8:2000::/64 autonomous-flag true [edit interfaces ethernet eth1] vyos@vyos# commit [ interfaces ethernet eth1 ipv6 router-advert ] Re-generating radvd config file for interface eth1... Starting radvd... Starting radvd: radvd.
[edit interfaces ethernet eth1] vyos@vyos# save Saving configuration to '/config/config.boot'... Done [edit]
eh1にip割り当て set interfaces ethernet eth1 address 2001:db8:2000::1/64
ユーザー作成 vyos@vyos:~$ configure [edit] vyos@vyos# set system login user ictsc2019 [edit] vyos@vyos# set system login user ictsc2019 authentication plaintext-password ictsc2019 [edit] vyos@vyos# commit [edit] vyos@vyos# save
タイムゾーン ictsc2019@vyos# set system time-zone Asia/Tokyo
お疲れ様です。チームkstmです。 問題「VyOSの設定が吹き飛んだ!」の解答を送らせていただきます。
実行した操作
・管理者用アカウントの追加、権限付与 vyos@vyos:~$ configure [edit] vyos@vyos# set system login user ictsc2019 [edit] vyos@vyos# set system login user ictsc2019 authentication plaintext-password ictsc2019 [edit] vyos@vyos# set system login user ictsc2019 level admin
・vyosユーザーの削除 ictsc2019@vyos# delete system login user vyos
・タイムゾーン変更をJSTに変更 ictsc2019@vyos# set system time-zone Asia/Tokyo
・VyOSのeh2にサーバーのゲートウェイに設定されているアドレス付与 set interfaces ethernet eth2 address 2001:db8:1000::1/64
・VyOSのeh1 にRAの設定付与 vyos@vyos# edit interfaces ethernet eth1 [edit interfaces ethernet eth1] vyos@vyos# set ip ip ipv6 [edit interfaces ethernet eth1] vyos@vyos# set ipv6 Possible completions:
address IPv6 address auto-configuration modes disable-forwarding Disable IPv6 forwarding on this interface only dup-addr-detect-transmits Number of NS messages to send while performing DAD ospfv3 IPv6 Open Shortest Path First (OSPFv3) ripng Routing Information Protocol (RIPng) router-advert Configure parameters for sending Router Advertisements (RAs)
[edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert Possible completions: cur-hop-limit Value to be placed in the "Current Hop Limit" field in RAs default-lifetime Value to be placed in "Router Lifetime" field in RAs default-preference Default router preference link-mtu Value of link MTU to place in RAs managed-flag Value for "managed address configuration" flag in RAs max-interval Maximum interval between unsolicited multicast RAs min-interval Minimum interval between unsolicited multicast RAs
name-server IPv6 address of a Recursive DNS Server other-config-flag Value to be placed in the "other configuration" flag in RAs +> prefix IPv6 prefix to be advertised in Router Advertisements (RAs) reachable-time Value to be placed in "Reachable Time" field in RAs retrans-timer Value to place in "Retrans Timer" field in RAs. send-advert Enable/disable sending RAs [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert send-advert true [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert cur-hop-limit 64 [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert ma managed-flag max-interval [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert max-interval 10 [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert other-config-flag true [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert de default-lifetime default-preference [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert default-preference high [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert an
Configuration path: ipv6 router-advert [an] is not valid
[edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert managed-flag true [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert prefix 2001:db8:2000::/64 [edit interfaces ethernet eth1] vyos@vyos# set ipv6 router-advert prefix 2001:db8:2000::/64 autonomous-flag true [edit interfaces ethernet eth1] vyos@vyos# commit [ interfaces ethernet eth1 ipv6 router-advert ] Re-generating radvd config file for interface eth1... Starting radvd... Starting radvd: radvd.
[edit interfaces ethernet eth1] vyos@vyos# save Saving configuration to '/config/config.boot'... Done [edit]
・eh1にIP付与
上記操作により、クライアントからサーバーへのpingが通るようになりました。
admin@client:~$ ping6 2001:db8:1000::2 PING 2001:db8:1000::2(2001:db8:1000::2) 56 data bytes 64 bytes from 2001:db8:1000::2: icmp_seq=1 ttl=63 time=1.30 ms 64 bytes from 2001:db8:1000::2: icmp_seq=2 ttl=63 time=0.805 ms 64 bytes from 2001:db8:1000::2: icmp_seq=3 ttl=63 time=0.731 ms 64 bytes from 2001:db8:1000::2: icmp_seq=4 ttl=63 time=0.757 ms ^C --- 2001:db8:1000::2 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3033ms rtt min/avg/max/mdev = 0.731/0.898/1.302/0.237 ms
以上、よろしくお願いします。