By default, Cisco switches forward Ethernet frames without any configuration. This means that you can buy a Cisco switch, plug in the right cables to connect various devices to the switch, power it on, and the switch will work properly.
However, to perform switch management over the network or use protocols such as SNMP, the switch will need to have an IP address. The IP address is configured under a logical interface, known as the management domain or VLAN. Usually, the default VLAN 1 acts like the switch’s own NIC for connecting into a LAN to send IP packets. Here are the steps to configure an IP address under VLAN 1:
- enter the VLAN 1 configuration mode with the interface vlan 1 global configuration command.
- assign an IP address with the ip address IP_ADDRESS SUBNET_MASK interface subcommand.
- enable the VLAN 1 interface with the no shutdown interface subcommand.
- (Optional) use the ip default-gateway IP_ADDRESS global configuration command to configure the default gateway.
- (Optional) Add the ip name-server IP_ADDRESS global configuration command to configure the DNS server.
How to set static IP Address in Ubuntu Server 16.04. It is really important to know how to configure static IP Address on Ubuntu Server, Because it is almost impossible to run a server without a static IP Address. During the installation, Ubuntu Server by default configured to use dynamic IP Address. Type 'arp -a' in the command prompt. This lists a number of MAC addresses with the associated IP addresses. Since you have the MAC address, scroll down the list to find the associated IP address. The MAC address is shown in the 'Physical Address' column with the IP address in the 'Internet Address' column. An example of a table record is in Step 4.
The print server will ignore any attempts to do this. If you wish to change the IP address again, use a Web Based Management (web browser), TELNET (using the SET IP ADDRESS command) or factory reset the print server (which will then allow you to use the ARP command again). To set the new IP address of the network interface which you have obtained from your network administrator, use the ping command and arp command with the -s flag (create an ARP entry). Note: In the following procedure, we assume that the MAC address of your network interface is 00:00:48:93:00:00 (hexadecimal), and that the IP address which you.
Here is a simple example network:
We have a simple network of a host and a switch. We can assign the switch with an IP address to enable IP communication between the two devices:
To verify the IP address set on a switch, we can use the show int vlan 1 command:
We can verify that the host can reach the switch using its IP address by pinging it from Host A:
It is really important to know how to configure static IP Address on Ubuntu Server, Because it is almost impossible to run a server without a static IP Address.
During the installation, Ubuntu Server by default configured to use dynamic IP Address. In this Tutorial we are going to learn how to set static IP Address in Ubuntu Server 16.04.
Following are the steps we are going to follow
- Check Available network interfaces on Ubuntu Server 16.04
- Add static IP Configuration to the network configuration file.
- Restart Ubuntu Networking Service.
Check Available Network Interfaces on Ubuntu Server
First of all you need to get the list of available network interfaces on your Ubuntu Server 16.04. We can use ip link show command to find available network interfaces on Ubuntu Linux.
You should get the similar output as below screenshot shows.
As above image shows, Our Ubuntu Server has Ethernet interfaces called enp0s3. Next we'll set static IP address to the enp0s3 interface.
Set static IP Address to the network interface
For this example I am going configure enp0s3 Ethernet interfaces with following ip configuration
IP Address = 192.168.1.10
Network mask = 255.255.255.0
Default gateway = 192.168.1.1
DNS Server = 8.8.8.8 and 8.8.4.4
On Ubuntu server, in order to set static IP address we need to add IP configuration to the /etc/network/interfaces file. So open the /etc/network/interfaces file using a command line text editor (You can use vim or nano on Ubuntu Server).
Then set static IP address as follows.
First line of configuration should be the word 'auto' followed by the interface name (This brought up the network interface automatically when system boot or when networking restart).
auto enp0s3
The next line should specify whether to use static IP address or dhcp ip on the enp0s3 network interface. In our case it should be static.
Then add the static IP configuration as follows.
auto enp0s3
iface enp0s3 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
Restart Networking Service
After setting up IP Configuration, we need to restart Ubuntu networking service.
sudo ip addr flush enp0s3 && sudo systemctl restart networking.service
Verify the static IP configuration.
After restarting network, use ip add command to make sure that static ip address has been assigned to the network interface.
Then send ICMP request to a remote host to check the connectivity.
Configure Multiple Network Interfaces
Same Way you can configure multiple network interface on ubuntu server using /etc/network/interfaces file.
Example
In the following example, I have set static IP Address on two network interfaces (enp0s3 and enp0s8).
auto enp0s3
iface enp0s3 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
auto enp0s8
iface enp0s8 inet static
Set Ip For Mac Address Windows 10
address 192.168.0.100
netmask 255.255.255.0
*** Most important thing when configuring multiple interface is you cannot set multiple default gateways. Only one interface should configure with the default gateway. For other interfaces you should add default gateway using static routes.
Summary : Set Static IP Ubuntu Server 16.04
Get New Ip Address Mac
In this tutorial we learned how to set static ip address in Ubuntu server 16.04.
- Using ip link show command we identified the available network interface in our ubuntu server 16.04.
- Then we add static IP address configuration to the /etc/network/interfaces file and restart the ubuntu networking service.