Probably there are many ways to do this.
Since you have access to the raspberry, the following command
ssh me@myraspberry 'ip addr show dev NIC2'
will execute the command between apices on the raspberry without opening an ssh shell. You should use it to connect via NIC1 of which you know the IP address, in order to show the IP address of the other NIC.
Or assuming you do not know the IP address of the first NIC, but you do know the MAC addresses of both NICs, you can use nmap on the command line:
sudo nmap -sn 192.168.1.0/24
This executes a ping scan on your local network (way way faster than suggested in another answer), which prints the ip address associated to each MAC address, like this:
# nmap -sn 192.168.1.0/24
Starting Nmap 6.40 ( http://nmap.org ) at 2014-06-05 03:41 CEST
Nmap scan report for mobilewifi.home (192.168.1.1)
Host is up (0.0065s latency).
MAC Address: 24:DB:AC:D5:B2:AC (Shenzhen Huawei Communication Technologies Co.)
Nmap scan report for 192.168.1.100
Host is up (0.010s latency).
MAC Address: C4:85:08:7D:79:40 (Intel Corporate)
Nmap scan report for 192.168.1.102
Host is up (0.14s latency).
MAC Address: 00:07:88:E8:6C:CF (Clipcomm)
Nmap scan report for 192.168.1.101
Host is up.
Nmap done: 256 IP addresses (4 hosts up) scanned in 2.23 seconds
knowing the MAC addresses of the two NICs, now you can find their IP address.
The MAC address is often also stored, that will give you a good idea. What type of setup do you have? – Austin T French – 2014-06-05T00:08:16.597
ifconfig
oripconfig
usually spit out the configuration of every NIC on your machine, which should give you what you're looking for. Without being more clear about your situation, there's not much else I can say. – Pockets – 2014-06-05T00:10:29.573Is
arp -a
what you're looking for?... – Pockets – 2014-06-05T00:36:51.390do arp -a from the raspberry pi?? No. My raspberry pi and my PC are connected to each other via two links. Hence I can reach the raspberry pi in two ways. I need to know both the ways before I ssh on to it. I know its mac address. – Vivek V K – 2014-06-05T00:42:57.763