How To Assign Ip Address In Suse Linux Command Line?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. To assign a static IP address, use the command “ifconfig”.
Syntax: ifconfig [interface] [IP_address] netmask [mask]
For example: ifconfig eth0 192.168.1.100 netmask 255.255.255.0
2. To assign a default gateway address, use the command “route”.
Syntax: route add default gw [IP_address]
For example: route add default gw 192.168.1.1
3. To add DNS servers, use the command “resolvconf”.
Syntax: resolvconf -a [interface] [nameserver]
For example: resolvconf -a eth0 8.8.8.8
4. To save the changes and make them permanent, use the command “netconfig”.
Syntax: netconfig update -f
This command will save the changes and make them permanent.
1. Use the ifconfig command to assign an IP address to a network interface:
ifconfig <interface> <IP address> netmask <subnet mask>
2. Use the route command to add a default gateway:
route add default gw <gateway IP address>
3. Use the nameserver command to add DNS servers:
nameserver <DNS server IP address>
4. Use the ntpdate command to synchronize the system clock with a remote NTP server:
ntpdate <NTP server IP address>