m (Shin moved page CLI - IP 주소 설정 to CLI - Configuring IP address) |
|||
Line 1: | Line 1: | ||
− | + | Both IPv4 and IPv6 addresses can be configured in the configuration mode. | |
− | |||
<pre> | <pre> | ||
LYSH@MyHostName# configure | LYSH@MyHostName# configure | ||
Line 15: | Line 14: | ||
</pre> | </pre> | ||
− | === | + | === Configuring new IP addresses === |
− | + | <pre> | |
− | + | LYSH@MyHostName# configure // Enters configuration mode. | |
+ | configure# ip add eth0 192.168.0.3/24 192.168.0.1 // Configures an IPv4 address, subnet, and gateway.(i.e. 192.168.0.1) | ||
+ | configure# ip add eth0 2000:4::40/64 2000:4::1 // Configures an IPv6 address, prefix, and gateway.(i.e, 2000:4::1) | ||
+ | configure# netplan apply // immediately apply the configurations. | ||
+ | configure# exit | ||
+ | configure# show interface | ||
+ | LYSH@MyHostName# ping 192.168.0.1 | ||
+ | LYSH@MyHostName# ping6 2000:4::1 | ||
+ | </pre> | ||
− | === | + | === Deleting an IP addresses === |
− | + | <pre> | |
− | + | LYSH@MyHostName# configure // Enters configuration mode. | |
− | + | configure# ip delete eth0 192.168.0.3/24 // Deletes an IPv4 address(i.e. 192.168.0.3/24) | |
− | + | configure# ip delete eth0 2000:4::40/64 // Deletes an IPv6 address(i.e. 2000:4::40/64) | |
− | + | configure# netplan apply // immediately apply the configurations. | |
− | + | configure# exit | |
+ | configure# show interface | ||
+ | </pre> |
Revision as of 16:36, 15 April 2021
Both IPv4 and IPv6 addresses can be configured in the configuration mode.
LYSH@MyHostName# configure configure# ip add -h usage: ip add [-h] interface ip [gateway] positional arguments: interface Ethernet interface name ip IPv4/Subnet Mask or IPv6 address/prefix [gateway] IPv4 or IPv6 address optional arguments: -h, --help show this help message and exit
Configuring new IP addresses
LYSH@MyHostName# configure // Enters configuration mode. configure# ip add eth0 192.168.0.3/24 192.168.0.1 // Configures an IPv4 address, subnet, and gateway.(i.e. 192.168.0.1) configure# ip add eth0 2000:4::40/64 2000:4::1 // Configures an IPv6 address, prefix, and gateway.(i.e, 2000:4::1) configure# netplan apply // immediately apply the configurations. configure# exit configure# show interface LYSH@MyHostName# ping 192.168.0.1 LYSH@MyHostName# ping6 2000:4::1
Deleting an IP addresses
LYSH@MyHostName# configure // Enters configuration mode. configure# ip delete eth0 192.168.0.3/24 // Deletes an IPv4 address(i.e. 192.168.0.3/24) configure# ip delete eth0 2000:4::40/64 // Deletes an IPv6 address(i.e. 2000:4::40/64) configure# netplan apply // immediately apply the configurations. configure# exit configure# show interface