Sponsored Content
Special Forums IP Networking Binding a /22 Subnet in Ubuntu 16 not working Post 302985261 by Bashed on Monday 7th of November 2016 03:46:40 PM
Old 11-07-2016
Binding a /22 Subnet in Ubuntu 16 not working

I'm trying to add *secondary* subnet, a /22 in Ubuntu 16 but the IPs don't ping despite proper routing at the switch level. **How do I properly bind the secondary /22 subnet (IPv4) and have these IPs ping?**

I can ping locally, but not from external. Below commands didn't work.

Code:
root@server:~# iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
root@server:~# iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT

Routing at the Cisco switch level is fine too:

Code:
interface Vlan100
 description Server xxx
 ip address xxx.xxx.16.1 255.255.252.0 secondary
 ip address xxx.xxx.105.41 255.255.255.248


/etc/network/interfaces shows something like this...

Code:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/*

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eno1
    iface eno1 inet static
        address xxx.xxx.105.42
        netmask 255.255.255.248
        network xxx.xxx.105.40
        broadcast xxx.xxx.105.47
        gateway xxx.xxx.105.41
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 8.8.8.8 8.8.4.4
        dns-search mydomain.com

iface eno1 inet static
  address XXX.XXX.16.0/22

Code:
root@server:~# ifconfig |more
eno1      Link encap:Ethernet  HWaddr d4:be:d9:ed:fb:8a  
          inet addr:xxx.xxx.xxx.42  Bcast:xxx.xxx.xxx.47  Mask:255.255.255.248
          inet6 addr: fe80::d6be:d9ff:feed:fb8a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7386 errors:0 dropped:0 overruns:0 frame:0
          TX packets:457 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:478778 (478.7 KB)  TX bytes:467117 (467.1 KB)

eno1:0    Link encap:Ethernet  HWaddr d4:be:d9:ed:fb:8a  
          inet addr:xxx.xxx.16.1  Bcast:xxx.xxx.19.255  Mask:255.255.252.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

 

9 More Discussions You Might Find Interesting

1. Ubuntu

Fedora and Ubuntu not working out with GRUB

I have tried befre but nothing works out proprly. I have Ubuntu I try to Install Fedora Core 1. When Fedora Cora is finished Installing It doesnt show Ubuntu on Grub. If I re-install Ubuntu and put grub on then Fedora wont show. I also have Windows 98 but that is always on the list as DOS or... (5 Replies)
Discussion started by: shade11
5 Replies

2. UNIX for Dummies Questions & Answers

VMPlayer stopped working after ubuntu updated kernel

A month or so ago Ubuntu Dapper did its auto-update thing and installed the new kernel (intrd.img-2.6.15-28-386, upgraded from intrd.img-2.6.15-27-386). I rebooted after install and immediately the xserver would not load. I quickly figured out that I could boot the old kernel from GRUB however,... (1 Reply)
Discussion started by: forchessonly
1 Replies

3. IP Networking

Migrating existing Subnet to a new subnet and changing ip addresses in UNIX

Hi, My project needs to migrate the existing Subnet (255.255.255.0) to a new subnet and change the ipaddresses (currently C class). How can I do that. I need some information. John (0 Replies)
Discussion started by: johnmarsh
0 Replies

4. IP Networking

Binding the IP address

hi all, i have an udp based application that doesn't bind to any particular address. -->while sneding the packets, i have some doubts.... 1) can the packet be transmitted with an source ip address as 0.0.0.0 2) if we select an interface based on destination ip address,... (0 Replies)
Discussion started by: vijaypdp2006
0 Replies

5. Ubuntu

Ubuntu 10.10 LAN connection stopped working...

Well this is weird. I restarted my dual boot Win7/Ubuntu 10.10 from ubuntu to windows. Everything was working fine and windows is always connecting properly to my lan. After restarting back into Ubuntu, all of a sudden I can't connect to my network. It looks as if its trying to connect through... (15 Replies)
Discussion started by: zixzix01
15 Replies

6. UNIX for Dummies Questions & Answers

terminator shell not working after upgrading ubuntu linux

Terminator is a program that allows users to set up flexible arrangements of GNOME terminals. It has stopped working for me after upgrading to ubuntu 11.10. it does not give prompt to type anything. Just stuck with /bin/bash in the title. I removed and installed again, same... (2 Replies)
Discussion started by: analyst
2 Replies

7. UNIX for Advanced & Expert Users

Working with configure file in ubuntu

Hi, I want to add the library in my configure file. i am doing it using autoconf in ubuntu. I am new to the autoconf. Can anyone please let me know how to add the library using configure file so that it can linked to my software which I am using? Thanks in advance!!!!! (0 Replies)
Discussion started by: diehard
0 Replies

8. Shell Programming and Scripting

Cat command not working to display Mac file in Ubuntu

Hi, Recently I got a .txt file from Mac user. when I try to open it in my Ubuntu machine using cat command it is not displaying any content of file however I can see the content using vi. Anyone know How to see its content using cat as I have to process it in my shell script. Thanks in... (4 Replies)
Discussion started by: diehard
4 Replies

9. Ubuntu

Email not working on Ubuntu

Hello, I 'm getting following error in my mail log for the email i 'm sending to outside domain. Not able to figure out what is the issue. Can anyone please help me on this. wrong answer on RCPT TO "550 5.1.1 <xxxxxxx@microsoft.com>: Recipient address rejected: User unknown in local... (3 Replies)
Discussion started by: fugitive562
3 Replies
netmasks(4)							   File Formats 						       netmasks(4)

NAME
netmasks - network mask database SYNOPSIS
/etc/inet/netmasks /etc/netmasks DESCRIPTION
The netmasks file contains network masks used to implement IP subnetting. It supports both standard subnetting as specified in RFC-950 and variable length subnetting as specified in RFC-1519. When using standard subnetting there should be a single line for each network that is subnetted in this file with the network number, any number of SPACE or TAB characters, and the network mask to use on that network. Network numbers and masks may be specified in the conventional IP `.' (dot) notation (like IP host addresses, but with zeroes for the host part). For example, 128.32.0.0 255.255.255.0 can be used to specify that the Class B network 128.32.0.0 should have eight bits of subnet field and eight bits of host field, in addition to the standard sixteen bits in the network field. When using variable length subnetting, the format is identical. However, there should be a line for each subnet with the first field being the subnet and the second field being the netmask that applies to that subnet. The users of the database, such as ifconfig(1M), perform a lookup to find the longest possible matching mask. It is possible to combine the RFC-950 and RFC-1519 form of subnet masks in the net- masks file. For example, 128.32.0.0 255.255.255.0 128.32.27.0 255.255.255.240 128.32.27.16 255.255.255.240 128.32.27.32 255.255.255.240 128.32.27.48 255.255.255.240 128.32.27.64 255.255.255.240 128.32.27.80 255.255.255.240 128.32.27.96 255.255.255.240 128.32.27.112 255.255.255.240 128.32.27.128 255.255.255.240 128.32.27.144 255.255.255.240 128.32.27.160 255.255.255.240 128.32.27.176 255.255.255.240 128.32.27.192 255.255.255.240 128.32.27.208 255.255.255.240 128.32.27.224 255.255.255.240 128.32.27.240 255.255.255.240 128.32.64.0 255.255.255.192 can be used to specify different netmasks in different parts of the 128.32.0.0 Class B network number. Addresses 128.32.27.0 through 128.32.27.255 have a subnet mask with 28 bits in the combined network and subnet fields (often referred to as the subnet field) and 4 bits in the host field. Furthermore, addresses 128.32.64.0 through 128.32.64.63 have a 26 bits in the subnet field. Finally, all other addresses in the range 128.32.0.0 through 128.32.255.255 have a 24 bit subnet field. Invalid entries are ignored. SEE ALSO
ifconfig(1M), inet(7P) Postel, Jon, and Mogul, Jeff, Internet Standard Subnetting Procedure, RFC 950, Network Information Center, SRI International, Menlo Park, Calif., August 1985. V. Fuller, T. Li, J. Yu, K. Varadhan, Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy, RFC 1519, Network Information Center, SRI International, Menlo Park, Calif., September 1993. T. Pummill, B. Manning, Variable Length Subnet Table For IPv4, RFC 1878, Network Information Center, SRI International, Menlo Park, Calif., December 1995. NOTES
/etc/inet/netmasks is the official SVr4 name of the netmasks file. The symbolic link /etc/netmasks exists for BSD compatibility. SunOS 5.10 7 Jan 1997 netmasks(4)
All times are GMT -4. The time now is 12:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy