Configure same VLAN on cisco router for two ports - router

I have to complete a part of a virtual network assignment.
The tasks sounds like "The VLan1 of the Sw3 should be assigned the second possible address of the subnet and fa0/1 of the R2 should be assigned the first possible address"
The fa0/1 interface address was assigned successfully.
The problem is Sw3 is recognized as Router so I am not sure how I should configure vlans, I think it should be something with the encapsulation dot1q
If I try to assign the same ip for the e0/0.1 and e0/1.1 interfaces of the Sw3 I get the exception about overlapping ip's.
The subnet is 172.16.3.0/24 and I should be able to ping the Linux server with the ip 172.16.3.254 from both Sw3 and R2
Boot image for the Sw3 is l3-advipservices-m-15.4-2T.bin

Closing the question and moving it to networkengineering stackexchange

Related

How to monitor virtual IP with zabbix?

in some cluster environments, there are pair servers that are HA 2 by 2. for example i have server1 with IP 22.1.1.1 and server2 with IP 22.1.1.2.
server1 is giving service and server2 is standby. there is this virtual IP 22.1.1.3 that other servers connect to it to get services from server1 and server2.
now i need to monitor this virtual IP to see if it is up and other servers outside its VLAN can connect to it. how i can do this in zabbix?
i don't have an actual physical server to create in zabbix according to this question. i tried to create one but i got errors. also this question is asked 3 years ago. is there any new features i can use to solve this problem?
You can create a host with agent ip 22.1.1.3 and monitor it in agentless mode.
You can ping it (icmpping), connect to a tcp port that you know it's open (net.tcp.service) or, in case of a web service, do a http call with the http agent and react accordingly.
Just create the correct items/templates according to the simple check and http agent documentation.
You do not need a physical server to create a host.
You can create a host with the target IP address and use various items against it - based on your question, you do not need agent items, but some other (remote) type.

strange behaviour Pinging Public IP

I've tried this on 2 different networks:
Set router to respond to ping on internet port.
Lookup public IP on www.whatsmyip.com
Use PuTTy to ssh into another server and pinging the public IP from there.
In one network 1 this works, in network 2 it won't. So the question is. What can cause this behaviour?
The public IP address (the address that external sites see your requests coming from, i.e. what whatismyip will tell you) may not be one that the router is directly reachable on, for example if Carrier-Grade NAT is deployed.
ISPs may use CGNAT if they don't have enough IPv4 addresses, in order to share a single address between multiple clients.
One way to tell if this is happening would be to compare whatismyip.com to the address the router says it has on its WAN/internet interface. If they're different (and the router is connected straight to the ISP), it's probably CGNAT at play.

How does a client socket application identify the server application on the same host computer

I have been trying to learn socket programming in C++ and got some progress for the basics. But I understood that basics are not fundamentals.
One of those fundamentals is about the question which is stated in the title. Lets say I have two separate applications running on the same computer. One of them has a server socket and the other one has a client.
When the server gets an IP address automatically, how can client find the server? Do I have to assign an IP address that is known by the client? In that case, maybe that IP address is not available on the network.
Or can client find and connect to the server by sone kind of name or id?
Have the server bind to all interfaces and have the client lookup 'localhost' by name; it's resolved locally, (ie. no external DNS service required), to an IP address stored in a 'hosts' file, and is set by default to 127.0.0.1
Google 'hosts file'
The IP address of any server in the same host is 127.0.0.1 unless the server has bound to a specific, different IP address. As #MartinJames points out, you can use 'localhost' as the hostname for that, except on certain broken Linux distributions.

Interfaces using the same internal virtual switch in Hyper-V don't ping

I have Windows Server 2008 and Windows 7 on virtual machines (HyperV). Win7 has 2 internal interfaces (Local Area Connection 4 and 5), the same situation is on Server 2008.
All interfaces are using one, the same internal virtual switch.
I thought that they are all in the same subnet now and should ping each other, but the only machines that can communicate are interface 5 (Win7) with interface 4 from Server.
How can I connect them all? Do I understand this interfaces and virtual switches properly?
When I do ping command I get: Reply from ...Server IP adress.. Destination host unreachable.
Virtual switch has static IP adress 192.168.1.1, when I set default Gateway on my interfaces I get error: warning- Multiple default gateways are intended to provide redundancy to a single networ. They will not function properly when the gateways are on two seperate, disjoint networks.
Your internal interfaces are suppose to have one configured for the current network your on and the other interface can be bridged to have the virtual network established. One interface will have the same Local Area network as the machine your using to run the virtual machines which allows your virtual machines to use the network. Also make sure you name your interfaces to keep them distinguished from each other, for example "NAT" and the other "Internalnet" hope this helps.

ZeroMQ (0MQ) basic issue re connecting or binding to sockets

I'm using ZeroMQ on Windows, using C#, and am confused by a very basic networking question. I set up simplistic sample programs, one to PUBlish messages, the others use a SUB socket to receive them (the SUBscriber programs).
Works fine when both are on the same box. I used endpoint tcp://127.0.0.1:5000
As the next step, I put the SUBscriber program on a separate virtual machine (VM), to simulate using separate computers. I ran ipconfig to get it's IP address (on the guest os), 192.168.92.136
The host os has several network interfaces, one of which is the VMware Network Adapter VMnet1, with IP 192.168.92.1
On the host os, I ran the PUB program and connected the socket to 192.168.92.136, the IP address of the guest os.
On the guest os, I ran the SUB program and connected the socket to the IP of the host os. Did not work.
Then I changed the SUB program on the guest os to make it connect it to it's own IP address, ie that of the guest os - 192.168.92.136. Now it works!
Question: Why? I'm confused. But in a way it sort of makes sense: if that socket is for a service that attends to various clients that dynamically come and go, it doesn't know the IP address of each client. Therefore what the heck do you specify as the IP address for the SUB socket?! So connecting it to it's own host IP address does solve that concern. But the ZeroMQ Guide doesn't say this anywhere!
A related question is: if your host has multiple network interfaces, and each has it's own IP address, then if you connect your socket to some other host using the IP address of that other host - do you not need to specify which of those network interfaces you want to connect through? If so, how?
Incidentally, only one subscriber program seems to be able to connect at a time. The 2nd program to attempt to connect to it's SUB socket to the local IP address always gets a "Address is in use" error-message. I'm trying to make progress in small steps and learn this as I go.
Thanks for any help or advice.
James Hurst, JamesH at Designforge dot com